generateColorscheme source customColors -> { colors = { dark; light; }; }
matching matugen -j hex: MD3 roles from scheme.nix + harmonized custom color
groups (Blend.harmonize hue toward source, tonal palette at chroma 48) +
source_color. Full output vs matugen 2.4.1 for #2B3975: MD3 roles bit-exact
both modes; a handful of custom-color channels land ±1 LSB off (Nix series
math vs Rust hardware transcendentals through the harmonize rotation).
Not yet wired into projects/themes (see next step).
Assisted-by: pi (opus-4.8)
Port material-colors 0.4.2's DynamicColor engine for the rainbow scheme at
standard contrast: contrast helpers (ratio_of_tones, lighter/darker,
foreground_tone), the full getTone resolution (contrast curves, toneDeltaPair
expansion, [50,60) avoidance, second-background), and all 49 MaterialDynamicColors
roles (mono/fidelity branches collapsed since rainbow is neither).
Validated bit-exact against matugen 4.0's colors output for #2B3975: 49/49
roles in dark AND light (98/98). Also matches the crate's own Rust test
vectors for #0000FF (the one delta was a master-vs-0.4.2 version diff).
Brick 4 of the pure-Nix matugen effort.
Assisted-by: pi (opus-4.8)
Port material-colors 0.4.2 palettes: tonalPalette hue chroma -> tone(t) via the
HCT solver (with the yellow tone-99 average quirk), corePalette (matugen's
palettes field: primary max(48,chroma), sec 16, tert hue+60/24, neutral 4,
neutral-variant 8, error 25/84), and rainbowPalettes (scheme palettes for the
role layer: neutral/neutral-variant chroma 0).
Validated: corePalette reproduces matugen's palettes JSON for #2B3975
bit-exact across all 6 palettes x 18 tones (108/108).
Assisted-by: pi (opus-4.8)
Port material-color-utilities' color pipeline to Nix: sRGB<->CAM16<->HCT with
the full HctSolver (findResultByJ Newton step + bisectToLimit over the 255
critical planes). hctFromHex/hexFromHct round-trip bit-exact across a 125-color
grid, including saturated colors that hit the bisect fallback. Constants ported
from the canonical TypeScript reference.
Brick 2 of the pure-Nix matugen effort. Standalone lib, not yet wired in.
Assisted-by: pi (opus-4.8)
Hand-rolled transcendentals (sqrt, cbrt, exp, ln, pow, sin, cos, atan, atan2)
via range reduction + series/Newton, since Nix has no math builtins. Verified
against known values to ~1e-6. Foundation for a pure-Nix material-color-utilities
port (goal: drop the matugen IFD).
Assisted-by: pi (opus-4.8)
The only nix-colors usage was hexToRGBString in the waybar style. Reimplement
it (plus hexToRGB) in a local lib/colors.nix, expose it via the flake lib
(outputs.lib.colors), and point waybar at it. Remove the nix-colors flake
input and relock (drops nix-colors + its base16-schemes/nixpkgs-lib inputs).
The colorscheme module was already self-contained (powered by the themes
generator), so nothing else depended on nix-colors. Verified atlas evaluates.
Assisted-by: pi (opus-4.8)
- killed most of the lib
- simplified flake tremendously
- decouple configs a bit
- export packages instead of legacyPackages
- use packages instead of overlays
- general cleanup