[+] Detect if a color is light

This commit is contained in:
Azalea (on HyDEV-Daisy) 2022-10-22 18:42:52 -04:00
parent 101d798c0a
commit d8f49a2ea2
No known key found for this signature in database
GPG key ID: E289FAC0DA92DD2B

View file

@ -218,3 +218,6 @@ class RGB:
# Convert back to RGB
return hsl.rgb()
def is_light(self):
return self.hsl().l > 0.5