add conversion functions to catppuccin module
This commit is contained in:
parent
7f5c5b718f
commit
82a11ef821
10 changed files with 663 additions and 391 deletions
8
overlays/catppuccin.nix
Normal file
8
overlays/catppuccin.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{inputs, ...}: let
|
||||
inherit (inputs.nixpkgs.lib) toHexString concatStrings;
|
||||
in {
|
||||
toHex = color: concatStrings ["#" (toHexString color.red) (toHexString color.green) (toHexString color.blue)];
|
||||
toHexNoHash = color: concatStrings [(toHexString color.red) (toHexString color.green) (toHexString color.blue)];
|
||||
toRGB = color: concatStrings ["rgb(" (toString color.red) "," (toString color.green) "," (toString color.blue) ")"];
|
||||
toRGBA = color: a: concatStrings ["rgba(" (toString color.red) "," (toString color.green) "," (toString color.blue) "," (toString a) ")"];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue