Re:Oklab: A perceptual color space for image processing
by reitzensteinm on Thursday December 24, 2020 @07:10AM
(#25526842)
It looks really cheap, you could easily hue shift every pixel in the game with this.
One trick I've used in the past is using the alpha channel to mask multiple hue shifts in a shader to give a lot of variations. Eg 0 = shift A, 0.5 = don't shift, 1 = shift B.
That way you can make eg leather armor with metal attachments, and tan or fade the leather and swap metal types independently.
Re:Oklab: A perceptual color space for image processing
by jacobolus on Thursday December 24, 2020 @04:31PM
(#25531622)
> It looks really cheap
It is pretty much the same cost as CIELAB. Just uses 2 full 3x3 matrices where CIELAB can be thought of as using matrices with a bunch of zeros in them.
Re:Oklab: A perceptual color space for image processing
by coldcode on Thursday December 24, 2020 @07:30AM
(#25526950)
As an artist who uses code a lot, this is going right into my toolset. Manipulating colors is a huge pain.
Re:Oklab: A perceptual color space for image processing
by mark-r on Friday December 25, 2020 @01:29AM
(#25534703)
You can change hues in RGB without having to use HSV. See https://stackoverflow.com/a/8510751/5987
With public domain C++ code! This is incredibly useful to me as a Unity developer. Can almost be plugged right in to C# & Unity Colors. Could be used for interesting real-time color effects. One of my favorite simple things to do in HSV is to animate the hue. This could be used to do something similar, but across that more attractive Oklab gradient.
Great post.