idk changes

This commit is contained in:
KoenDR06 2026-01-07 16:58:48 +01:00
parent 954bf2d4ba
commit 6848a9d5e0
7 changed files with 25 additions and 19 deletions

11
lib/catppuccin.nix Normal file
View file

@ -0,0 +1,11 @@
{inputs, ...}: let
inherit (inputs.nixpkgs.lib) toHexString concatStrings strings;
inherit (strings) fixedWidthString;
padHex = n: fixedWidthString 2 "0" (toHexString n);
in {
toHex = color: concatStrings ["#" (padHex color.red) (padHex color.green) (padHex color.blue)];
toHexNoHash = color: concatStrings [(padHex color.red) (padHex color.green) (padHex 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) ")"];
}