nvf/lib/types/theme.nix
Charlie Root e80dedd098
modules: add base16 Theming support
theme/theme.nix: fix formatting

supported-themes.nix: formatting

clean up base16-colors.nix

theme: fix plugin setup, change base16 flake input
2024-10-04 21:34:14 +02:00

13 lines
392 B
Nix

{lib}: let
inherit (lib.strings) isString hasPrefix;
inherit (lib.types) mkOptionType;
inherit (builtins) stringLength;
# This was almost entirely taken from raf himself.
in {
hexColorType = mkOptionType {
name = "hex-color";
descriptionClass = "noun";
description = "RGB color in hex format";
check = x: isString x && hasPrefix "#" x && stringLength x == 7;
};
}