Join Slack
Powered by
I heard <HSL color space> is easier to reason abou...
# compose
d
Denis
02/10/2021, 3:33 PM
I heard
HSL color space
is easier to reason about, but I see nothing about it in compose packages [1] [2]. There's [3], is it OK to use it? [1]
https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color
[2]
https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/colorspace/ColorSpace
[3]
https://developer.android.com/reference/kotlin/androidx/core/graphics/ColorUtils#HSLToColor(kotlin.FloatArray)
Denis
02/10/2021, 3:41 PM
Some say
L*a*b*
is even better. And there are some mentions of it on the ColorSpace page.
k
Kirill Grouchnikov
02/10/2021, 3:51 PM
The available color spaces in Compose are at
https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/colorspace/ColorSpaces
. HSL itself is
not
a color space, much like RGB is not. HSL is a transformation of RGB within a specific color space. It is indeed easier to reason about and provides a more "natural" way to do color transformations and transitions.
👍 1
Kirill Grouchnikov
02/10/2021, 3:51 PM
And for CIE Lab* see
https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/colorspace/ColorSpaces#CieLab:androidx.compose[…]s.colorspace.ColorSpace
d
Denis
02/10/2021, 3:56 PM
Thanks for corrections and links, Kirill! I had no idea about the distinction between color models and spaces.
3
Views
Open in Slack
Previous
Next