1

Color: Put hex colors under the color.hex key

This commit is contained in:
2024-10-14 20:37:45 +02:00
parent 0a39fe41f9
commit b434994994
8 changed files with 118 additions and 121 deletions

View File

@ -53,15 +53,17 @@ in {
# This module sets its own options
# to the values specified in a colorscheme file.
modules.color = {
light = lib.pipe colorKeys [
(builtins.map (mkColorAssignment lightDefs))
lib.mergeAttrsList
];
hex = {
light = lib.pipe colorKeys [
(builtins.map (mkColorAssignment lightDefs))
lib.mergeAttrsList
];
dark = lib.pipe colorKeys [
(builtins.map (mkColorAssignment darkDefs))
lib.mergeAttrsList
];
dark = lib.pipe colorKeys [
(builtins.map (mkColorAssignment darkDefs))
lib.mergeAttrsList
];
};
rgb = {
light = lib.pipe colorKeys [

View File

@ -29,29 +29,26 @@ with mylib.modules; {
default = "JetBrainsMono Nerd Font Mono";
};
# Internal-only options
keys = mkOption {
type = types.listOf types.str;
description = "The names of all possible colors";
default = colorKeys;
};
light = mkOption {
hex = mkOption {
type = types.attrs;
description = "Colors belonging to the selected light scheme";
};
dark = mkOption {
type = types.attrs;
description = "Colors belonging to the selected dark scheme";
description = "Colors in \"RRGGBB\" hexadecimal format";
};
rgbString = mkOption {
type = types.attrs;
description = "Colors belonging to the selected light scheme in 'RR,GG,BB' format";
description = "Colors in \"RR,GG,BB\" decimal format";
};
rgb = mkOption {
type = types.attrs;
description = "Colors belonging to the selected light scheme in '[RR GG BB]' format";
description = "Colors in [RR GG BB] decimal format";
};
}