[+] Detect if a color is light
This commit is contained in:
parent
101d798c0a
commit
d8f49a2ea2
1 changed files with 3 additions and 0 deletions
|
@ -218,3 +218,6 @@ class RGB:
|
|||
|
||||
# Convert back to RGB
|
||||
return hsl.rgb()
|
||||
|
||||
def is_light(self):
|
||||
return self.hsl().l > 0.5
|
||||
|
|
Loading…
Reference in a new issue