diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-30 22:44:37 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-30 22:44:37 +1100 |
| commit | 55da502880549d9fd7f4bc01da58dcbccc55eb9a (patch) | |
| tree | ba9a662044824a50cf2d76122f0be782ee5f4b70 /scheme/islight.py | |
| parent | install: hypr optional trash-cli (diff) | |
| download | caelestia-cli-55da502880549d9fd7f4bc01da58dcbccc55eb9a.tar.gz caelestia-cli-55da502880549d9fd7f4bc01da58dcbccc55eb9a.tar.bz2 caelestia-cli-55da502880549d9fd7f4bc01da58dcbccc55eb9a.zip | |
scheme: better light/dark theme detection
Diffstat (limited to 'scheme/islight.py')
| -rwxr-xr-x | scheme/islight.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/scheme/islight.py b/scheme/islight.py deleted file mode 100755 index 1adcf3f..0000000 --- a/scheme/islight.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/python - -import sys -from PIL import Image -from materialyoucolor.quantize import QuantizeCelebi -from materialyoucolor.score.score import Score -from materialyoucolor.hct import Hct -from resizeimg import resize - - -if __name__ == "__main__": - with Image.open(sys.argv[1]) as img: - img = resize(img)[0] - colours = QuantizeCelebi(list(img.getdata()), 128) - hct = Hct.from_int(Score.score(colours)[0]) - sys.exit(0 if hct.tone > 60 else 1) |