summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-12 16:28:12 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-12 16:28:12 +1000
commitdc4b6733bfbab1fc9e9f5001d800b549d3f6f98f (patch)
tree49be04f01ddaef9de0d234ccdaafae4105caef69 /src
parentscheme: add variant option (diff)
downloadcaelestia-cli-dc4b6733bfbab1fc9e9f5001d800b549d3f6f98f.tar.gz
caelestia-cli-dc4b6733bfbab1fc9e9f5001d800b549d3f6f98f.tar.bz2
caelestia-cli-dc4b6733bfbab1fc9e9f5001d800b549d3f6f98f.zip
material: better mono scheme
Diffstat (limited to 'src')
-rwxr-xr-xsrc/caelestia/utils/material/generator.py6
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)