Description
pygame.Color has very useful and wide range of functionality. One more addition which I think would make sense in game development space is adding color operations & conversions in OKLab space.
It's already being adopted in many similar engines and libraries because of it's strengths. You can read the blog post by OKLab's creator.
It most likely would have an API similar to this, I'd like to hear your opinions.
# OKLab -> Linear RGB
# L: lightness
# a: green <-> red
# b: blue <-> yellow
pygame.Color.from_oklab(L: float, a: float, b: float)
# Polar OKLab -> Linear RGB
# L: lightness
# c: chroma
# h: hue
pygame.Color.from_oklch(L: float, c: float, h: float)
# Properties similar to pygame.Color.hsv
pygame.Color.oklab
pygame.Color.oklch
It makes it possible to have perceptually much better gradients and calculating similarity between colors more accurately.
Description
pygame.Colorhas very useful and wide range of functionality. One more addition which I think would make sense in game development space is adding color operations & conversions in OKLab space.It's already being adopted in many similar engines and libraries because of it's strengths. You can read the blog post by OKLab's creator.
It most likely would have an API similar to this, I'd like to hear your opinions.
It makes it possible to have perceptually much better gradients and calculating similarity between colors more accurately.