scheme: dynamic light theme

Autodetect based on wallpaper
Also resize wallpaper so faster
And async magick blur so wallpaper doesnt block
This commit is contained in:
2 * r + 2 * t
2025-01-29 18:17:13 +11:00
parent 6f00e65727
commit 5118c8da96
7 changed files with 56 additions and 5 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/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)