From d8f49a2ea20171bad285e98c008c0c6872927724 Mon Sep 17 00:00:00 2001 From: "Azalea (on HyDEV-Daisy)" Date: Sat, 22 Oct 2022 18:42:52 -0400 Subject: [PATCH] [+] Detect if a color is light --- hyfetch/color_util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hyfetch/color_util.py b/hyfetch/color_util.py index bc00395f..1cfd6df8 100644 --- a/hyfetch/color_util.py +++ b/hyfetch/color_util.py @@ -218,3 +218,6 @@ class RGB: # Convert back to RGB return hsl.rgb() + + def is_light(self): + return self.hsl().l > 0.5