diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-08 13:33:45 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-08 13:33:45 +1000 |
| commit | e342d2d2dc51677f9727f7117e1746ef2231db0d (patch) | |
| tree | 6bf6df7eb1bc36d4bc740390133c0c8b4838df12 /scheme/autoadjust.py | |
| parent | scheme: better colours + parallel generation (diff) | |
| download | caelestia-cli-e342d2d2dc51677f9727f7117e1746ef2231db0d.tar.gz caelestia-cli-e342d2d2dc51677f9727f7117e1746ef2231db0d.tar.bz2 caelestia-cli-e342d2d2dc51677f9727f7117e1746ef2231db0d.zip | |
scheme: better primary colour
Primary colour is used for layers + accents
Get highest scored bright colour instead of just highest scored
Diffstat (limited to 'scheme/autoadjust.py')
| -rwxr-xr-x | scheme/autoadjust.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scheme/autoadjust.py b/scheme/autoadjust.py index 73deb88..294c33f 100755 --- a/scheme/autoadjust.py +++ b/scheme/autoadjust.py @@ -164,13 +164,13 @@ def get_scheme(scheme: str) -> DynamicScheme: if __name__ == "__main__": light = sys.argv[1] == "light" scheme = sys.argv[2] - colours_in = sys.argv[3] + colours_in = sys.argv[3].split(" ") base = light_colours if light else dark_colours chroma_mult = 1.5 if light else 1.2 # Convert to HLS - colours = [hex_to_hls(c) for c in colours_in.split(" ")] + colours = [hex_to_hls(c) for c in colours_in[1:]] # Sort colours and turn into dict colours = smart_sort(colours, base) @@ -200,7 +200,7 @@ if __name__ == "__main__": # Layers and accents material = {} - primary_scheme = MatScheme(Hct.from_int(int(f"0xFF{colours_in.split(" ")[0]}", 16)), not light, 0) + primary_scheme = MatScheme(Hct.from_int(int(f"0xFF{colours_in[0]}", 16)), not light, 0) for colour in vars(MaterialDynamicColors).keys(): colour_name = getattr(MaterialDynamicColors, colour) if hasattr(colour_name, "get_hct"): |