A new color space

I learned that Google has launched a color space called “HCT” not long ago. From the comparison chart, its color transition is even better than the previously described oklab, and closer to the realistic paint.
There is a project called “material-color-utilities” that uses it. It is Apache 2.0 protocol, and as far as I know is compatible with gpl v3.I don’t know if it will help us when it comes out in c++…


5 Likes

I am curious to find the conversion formulas to RGB.

looks fun!

Found some content on GitHub:
image
SmartToolFactory/Compose-Extended-Colors: :rainbow::rocket: Utility library that expands Compose Colors with Material Design2 colors, color swatches, Material Design 3 Tonal Palettes, color names, and utility functions to convert between HSL, HSV, RGB, HCT models and to HEX or from HEX (github.com)

But I don’t understand the code and don’t know if it’s useful.

I have found this color space before, but I feel it is similar to OkLCH

I think oklab may be the best color space. Now I use it to predict the color mixing of light

If there are two colors C(L, A, B) and c(l, a, b), I think their mixing result of light may be Cc(L * l, A + a, B + b). I’ve always wondered why multipliy is often used in lighting in painting. Later, I learned that people’s perception of light intensity is logarithmic

Therefore, my understanding is that the lightness I feel is not L and l, but log(n)(L) and log(n)(l), so the final color lightness is log(n)(L) + log(n)(l) = log (n)(L * l)

This may not be true, but I find it very useful to speculate on the color

As for the transition mixing of colors, if A transitions to C, we often get AC1, but the correct result may be AC

These results can be easily calculated by oklab

Well, I searched “HCT oklab” on Twitter and got some information: (5) hct oklab - Twitter Search / Twitter

There is a Chinese reply that means the same as you, and oklab / okhsl is still recommended.

The other is a website. We can see the comparison between several models.


Some cases are consistent, but the mixture of black and white is very different. The span of hue is too large and beyond my acceptance.

Oklab / oklch is better. I just knew that unity has added oklab to itself after Photoshop.This may be good news, because oklab has more reference code.

The mixing of “color” is not “correct”. The blend of “light” is RGB.
Even pigments don’t change that much. Except that the bias of turquoise is relatively close (but it is difficult to distinguish with the naked eye)

Yes, but I think there are two kinds of mixing are confused. One is light mixing, that is, when a color light shines on an object of another color, the mixing results are different with different light intensities. They are additive mixing; The other is interpolation blending, that is, the common normal blending mode. As long as we know the correct result color of illumination blending, and then interpolate and blend with the background color, we can get the same result as illumination blending. Therefore, we must know the correct result color of illumination blending when using interpolation blending, but the result color of some illumination blending exceeds sRGB,for example, oklch (0.99, 0.99, 265) may only have the color oklch (0.99, 0.01,265) in the sRGB range. If it is interpolated and mixed with this color, it will be far from the correct result.

1 Like

There is no such statement. The physical properties of light have not changed, but the human eye has corrected it

Are you talking about “normal” as I understand it?


The above formula is derived from speculation, and there is no corresponding example in reality. Only when one of them is 100%, it can be understood as “illuminating another object through translucent glass”

Or are you talking about “linear interpolation” of two colors? This is obviously related to the arrangement of colors.

RGB I’m talking about is not a specific color space. It’s a generalization of complex reality (based on the three cones of the human eye). Just as your monitor is also composed of RGB picture tubes.

Of course, the laws summarized can also be used in RGB space. First, we cannot change the current mainstream. Second, if rgb32bit is used in the future, I don’t need to change it (the color calculated by the software is better, but the RGB value is still 0-255)