gpaligot
08/24/2021, 7:11 PMColor
to a HSL representation but I can only find a HSL to RGB function in the Color
class. Someone can confirm me that the RGB to HSL function doesn't exist?Zach Klippenstein (he/him) [MOD]
08/24/2021, 7:33 PMval (h, s, l) = color.convertTo(ColorSpaces.HSL)
Color
are really just whatever components the color space defines. They’re just called “rgb” because it’s the most common, presumablyromainguy
08/24/2021, 7:41 PMHSL
is not a color space, so you won’t find it in ColorSpaces
gpaligot
08/24/2021, 7:44 PMColorSpaces
. In french, we call this an emotional elevator. Don't know if this expression is valid in English. ^^romainguy
08/24/2021, 7:45 PMtoHsl()
but if you are ok with HSV instead of HSL you can use android.graphics.Colorandroidx.core.graphics
gpaligot
08/24/2021, 7:47 PMZach Klippenstein (he/him) [MOD]
08/24/2021, 8:51 PMromainguy
08/24/2021, 9:06 PMZach Klippenstein (he/him) [MOD]
08/24/2021, 9:07 PM