Misterio77 / nix-colors

Modules and schemes to make theming with Nix awesome.
GNU General Public License v3.0
465 stars 38 forks source link

More lib functions? #15

Closed djacu closed 1 year ago

djacu commented 2 years ago

Hey this is a great module and thanks for creating it!

One thing I had to do was convert hex values to comma separated RGB values so I could use them with waybar. The styling uses CSS and I needed them in RGB so I could use them with an opacity. I created several small functions to do the conversion which you can find here. Would be happy to put in a PR adding them to the lib of this module if it is desired.

Misterio77 commented 2 years ago

Please do!

I'm actually planning on splitting the lib into "core" and "contrib" sections. I also plan on implementing a function that can import base16 .yml schemes into nix-colors, as well as another function that can apply a nix-colors scheme to a base16 template (and output a string the person might use however they want). So these functions would constitute the core, and the app-specific ones would be contrib.

Converting between color formats is a very necessary core function, and would be greatly appreciated!

(For now, please add these to the usual function file, and I'll handle the splitting)

Misterio77 commented 2 years ago

Hey, just wanted to let you (and anyone else possibly following this thread) know that loading YAML schemes is now supported :)

Rendering templates should come soonish (not a priority, I think it's already ergonomical enough without this feature, but it's a nice to have regardless)

Feel free to add any color-related functions you might be interested in upstreaming at lib/core

djacu commented 2 years ago

Awesome! And will do! I've been pondering how to add some testing to the functions I wrote and after looking through nixpkgs, I think I have an idea on how to do it.

Misterio77 commented 1 year ago

Fixed by #18