mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 11:07:44 +00:00
feat: huge darwin overhaul
This commit is contained in:
parent
7935aa65f5
commit
c4888c276b
16 changed files with 367 additions and 230 deletions
13
lib/colors.nix
Normal file
13
lib/colors.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
_: self: _: {
|
||||
luminance = hex: let
|
||||
r = self.substring 0 2 hex |> self.fromHexString;
|
||||
g = self.substring 2 4 hex |> self.fromHexString;
|
||||
b = self.substring 4 6 hex |> self.fromHexString;
|
||||
in assert !self.hasPrefix "#" hex;
|
||||
0.2126 * r +
|
||||
0.7152 * g +
|
||||
0.0722 * b ;
|
||||
|
||||
isDark = { base00, base07, ... }: self.luminance base00 < self.luminance base07;
|
||||
isLight = theme: !self.isDark theme;
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
inputs: self: super: let
|
||||
colors = import ./colors.nix inputs self super;
|
||||
filesystem = import ./filesystem.nix inputs self super;
|
||||
option = import ./option.nix inputs self super;
|
||||
system = import ./system.nix inputs self super;
|
||||
values = import ./values.nix inputs self super;
|
||||
in filesystem // option // system // values
|
||||
in colors // filesystem // option // system // values
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue