diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-12 16:28:12 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-12 16:28:12 +1000 |
| commit | dc4b6733bfbab1fc9e9f5001d800b549d3f6f98f (patch) | |
| tree | 49be04f01ddaef9de0d234ccdaafae4105caef69 /src | |
| parent | scheme: add variant option (diff) | |
| download | caelestia-cli-dc4b6733bfbab1fc9e9f5001d800b549d3f6f98f.tar.gz caelestia-cli-dc4b6733bfbab1fc9e9f5001d800b549d3f6f98f.tar.bz2 caelestia-cli-dc4b6733bfbab1fc9e9f5001d800b549d3f6f98f.zip | |
material: better mono scheme
Diffstat (limited to '')
| -rwxr-xr-x | src/caelestia/utils/material/generator.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/caelestia/utils/material/generator.py b/src/caelestia/utils/material/generator.py index 656a5af..584d375 100755 --- a/src/caelestia/utils/material/generator.py +++ b/src/caelestia/utils/material/generator.py @@ -74,8 +74,10 @@ colour_names = [ ] -def grayscale(colour: Hct, light: bool) -> None: +def grayscale(colour: Hct, light: bool) -> Hct: + colour = darken(colour, 0.35) if light else lighten(colour, 0.65) colour.chroma = 0 + return colour def mix(a: Hct, b: Hct, w: float) -> Hct: @@ -159,7 +161,7 @@ def gen_scheme(scheme, primary: Hct, colours: list[Hct]) -> dict[str, str]: # Harmonize colours for name, hct in colours.items(): if scheme.variant == "monochrome": - grayscale(hct, light) + colours[name] = grayscale(hct, light) else: harmonized = harmonize(hct, primary) colours[name] = darken(harmonized, 0.35) if light else lighten(harmonized, 0.65) |