[+] Detect if a color is light
This commit is contained in:
@@ -218,3 +218,6 @@ class RGB:
|
||||
|
||||
# Convert back to RGB
|
||||
return hsl.rgb()
|
||||
|
||||
def is_light(self):
|
||||
return self.hsl().l > 0.5
|
||||
|
||||
Reference in New Issue
Block a user