Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

CIE LAB, while the most popular perceptual color model, is super outdated and flawed. JzAzBz is the best color model that I know of, which extremely straight hue lines and uniform MacAdam ellipses. The coordinate system is very similar to CIE LAB so no one should be lost when using that instead of LAB, or alongside LAB if you would want LAB to remain despite its flaws.

https://www.researchgate.net/publication/317811721_Perceptually_uniform_color_space_for_image_signals_including_high_dynamic_range_and_wide_gamut

Something to note about the article that tripped me up at first was that you are to make your own inverse matrices and I believe somewhere in the conversion from L'M'S' to XYZ it wanted you to use elements of the 3 coordinates that you are currently working on to solve the last 2 or 1 coordinates. Just to save a headache in case we have the same problems.

A really obvious glaring issue with CIE LAB that anyone with Photoshop can see is how it handles Blue. Set the vertical strip in Photoshop's color window to LAB's L and set the hue to Blue and you'll see that when it's dark it's Blue as you would expect but as it gets brighter it becomes Cyan. That's not perceptually the same hue, Blue and Cyan are different.

Some less obvious issues, or rather benefits JzAzBz has over CIE LAB, is its measurement of perceptual brightness which, when compared side by side, is much better. The research article I linked also has a few graphs illustrating differences in mapping between LAB and JzAzBz, which looks more evenly spaced. I believe this image shows the MacAdam Ellipses in CIE LAB, though it might be something else entirely and I hope that you have better luck finding this than I had for comparing with JzAzBz's MacAdam Ellipses graph.

This should also help with automatically picking unique colors from images.

--- --- ---

While I haven't noticed any actual issue with RGB blending, I just want to verify that it's blending with Linearized Gamma. I'm not at my own computer right now so I can't blend between Green and Red and see what it does to know for sure, it's just a concern that came to mind while typing out the earlier bit.

--- --- ---

There's 3 Hue-based color selection approaches, HSV HSL and HSY / HCY, but there's no LCH which is the hue / chroma transformation of LAB. Ideally if JzAzBz is implemented there would be a JzCzH.

--- --- ---

Median filter on imported images to remove noise / blemishes. Like I've got beautiful paintings I bring in and they have cracks and other issues, on top of digital noise at times. I'm prepared to run median filters in an external program and have multiple copies of the same image on my HDD for the program to use but I'd rather it all be done live so I don't have to prepare multiple variations of images.

--- --- ---

A hilbert curve would be useful as an additional method of choosing colors from an image. https://corte.si/posts/code/hilbert/swatches/index.html https://github.com/cortesi/scurve It arranges colors in a very approachable manner, much better than trying to locate important colors when the surrounding colors are influencing its appearance and making it look like a different color, plus it's easier to click on colors since they get grouped together. Perhaps it would be even better when arranging based on JzCzH or JzAzBz instead of RGB? It would also be nice to run a Median filter first so that noise or scratches or other blemishes don't appear.

--- --- ---

Global non-destructive color filters such as RGB curves (like non-destructive adjustment layers in Photoshop) could be useful for giving a palette a certain tone without having to start off with colors that fit that tone, like purple shadows and yellow highlights which seem popular, and this can be done with curves while simpler and more approachable colors like straight up black and white can be used. Also with an option to "bake down" the color filters to the grid and perhaps a mask / intensity / opacity that can be painted in or out with a tool like the Saturation / Desaturation pen tools.

Paired with this, the ability to detect a color filter / RGB curve / tone in an input image (after a median filter to avoid noise / scratches / etc), toggle a correction for this on and off, select colors from the image, and add the detected color filter / RGB curve as a global non-destructive filter. This way the user can better see what a color is supposed to be behind all the lighting effects, decide if they want to include it, then apply the color filter or modify it in some way. It's always easier to modify colors when an image is properly white balanced, reds are better distinguished from oranges and other similar colors are better distinguished and are easier to specifically modify. Otherwise lots of colors that are perceptually different could all technically be different shades of yellow. White balancing works best with linearized gamma RGB curves done in a very large RGB color space, like ACES,  in my experience.

My ideas for detecting color filters / tone curves / etc would either be to have the user specify colors that should be 0 saturation (not just middle gray) with the color picker, and have the program construct an RGB curve what makes those colors have the lowest saturation possible. This should cover shadows, mids, and highlights. Perhaps a blatant black / white level selection as well. The other idea is based on histogram equalization.

--- --- ---

Maybe 3D LUT / ICC Profile support for things like CRT simulations? Maybe? I don't really care too much about this specifically but someone might find it cool to use pure sRGB red, green, and blue and then load a 3D LUT that makes it look like a Sony Trinitron's color primaries. I would find it cool as well but I don't really feel like it would be as useful as anything prior to this.

Wow, very comprehensive explanation!  

There are  many good ideas in your post.   This will be something I  can work on in upcoming  weeks after release.

Thank you !

Additional issues after using the program longer and logging them when found;

When using an Adjustment that uses Hue, it doesn't look back around in a circular manner. It should be enough to apply modulo to it like (hue+adj)%255 depending on how it's set up.

--- --- ---

RGB blending isn't in linearized gamma so Red to Green doesn't include the proper yellows and instead gives browns. However: Lots of people are used to RGB blending that isn't gamma corrected so it might be better to have the existing RGB Blending and underneath it Linearized RGB blending where it linearizes the gamma curve / tone curve of the assumed sRGB monitor and blends based on emitted light levels. It's much more painterly.

--- --- ---

The "WHEEL" color selector's Triangle or Square doesn't update in color when a new color is picked on the grid and it only updates when switching between Triangle and Square or HSV and HSL.

--- --- ---

It looks as though reds become magenta after using Luminosity and Chroma adjustments enough times, even though Hue is left alone.

--- --- ---

Setting the hue of a color on the grid with the HSL sliders, selecting another color to adjust the hue, and then going back to the past color shows that it's a different hue than what I left it with. It takes multiple edits to get a specific hue.

--- --- ---

LAB interpolation between light yellow and middle magenta results or resulted in cyan, which doesn't seem right.

--- --- ---

I could not get the LAB or RGB sliders in the left-most tab (if I remember the position correctly) to actually edit a selected color.

--- --- ---

Selecting colors from an image makes too many colors too fast. It seems to be based on the time of mouse 1 being held down because if I click on the image and don't move my mouse it'll make 6 or so duplicate colors. It should be based on moving over new pixels such that every new pixel that's moused over results in a new pixel or every new pixel with a limit like 10 per second or faster.

--- --- ---

This isn't very important if JzAzBz gets in since it's VERY close to the Munsell colors but there's a large set of colors called the Munsell Renotation Data (if I remember correctly) that were determined to have the same hue / chroma / luminosity and depending on where you get this data it should come with sRGB conversions, if not you should be able to convert to D65 sRGB from the XYZ / xyY coords it often comes with. These can be interpolated but the one time I saw a Munsell color picker with interpolated values it was extremely heavy processing. http://pteromys.melonisland.net/munsell/

--- --- ---

Something like Coolorus or Paletton or other online color theme / color scheme designers what let you divide a color wheel geometrically, otherwise a separate program has to be used to develop color schemes with guidance. This would be best with a Hue/Chroma transform of JzAzBz due to its very perceptually even arrangement of hues, whereas LAB has really stretched out blues and RGB's HSL/HSV has a lot of purple IIRC. The ability to link colors on the grid to draggable positions on the color scheme designer tool would be helpful so that linked blends and such can all update live when adjustments are made to the color scheme.

Thank you again! 

Feedback from people who know the topic and use the program is the best. 

I will try to address  issues you have mentioned in the next update.

It looks like shaders are used for color conversion so here's a shader I wrote a while back for sRGB -> Jzazbz -> sRGB https://pastebin.com/DMBNjc6g Might save some time to take the guts of this rather than rewrite from the article.

Thank you ! This will be very helpful. 

I am preparing small update with some bug fixes reported by you and others. I will probably release it today.