forked from Shinonome/dots-hyprland
auto m3 palette: use scheme-content for very low saturation pics
This commit is contained in:
@@ -27,9 +27,14 @@ def image_colorfulness(image):
|
|||||||
colorfulness = np.sqrt(std_rg ** 2 + std_yb ** 2) + (0.3 * np.sqrt(mean_rg ** 2 + mean_yb ** 2))
|
colorfulness = np.sqrt(std_rg ** 2 + std_yb ** 2) + (0.3 * np.sqrt(mean_rg ** 2 + mean_yb ** 2))
|
||||||
return colorfulness
|
return colorfulness
|
||||||
|
|
||||||
|
# scheme-content respects the image's colors very well, but it might
|
||||||
|
# look too saturated, so we only use it for not very colorful images to be safe
|
||||||
def pick_scheme(colorfulness):
|
def pick_scheme(colorfulness):
|
||||||
if colorfulness < 10:
|
if colorfulness < 10:
|
||||||
return "scheme-monochrome"
|
# return "scheme-monochrome"
|
||||||
|
return "scheme-content"
|
||||||
|
elif colorfulness < 20:
|
||||||
|
return "scheme-content"
|
||||||
elif colorfulness < 50:
|
elif colorfulness < 50:
|
||||||
return "scheme-neutral"
|
return "scheme-neutral"
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user