I found this explanation: "A hald clut is a Colour Look-Up Table with three dimensions, a cube, but stored by IM as a square image. The table is indexed by an RGB triplet, and each entry in the table is also an RGB triplet, so the colours in an image can be transformed by a hald clut.
I don’t know the origin of the word “hald”. Perhaps an acronym: “Higher And Lower Dimension”? Or named after the person who devised it? I don’t know." at Editing with hald cluts
Colour lookup tables; in order to be as complete as can be, need to feature something of an HSL matrix; with a given number of Hues, and a range of Saturation and Lightness for each, which you then fill in with the results that the given edit would give. If you graph it out you get a cube (a 3 dimensional graph featuring X,Y,Z coordinates). The HaldCLUT is a means to render that in 2 dimensions, conveniently in a TIFF.
For that I would follow Iain´s recommendation so you can actually see the 3D representation of a LUT and how it changes when you change target values of your each of your sources points.
You can do any transformation of the color space as long as for each original value you have a single output value. You can do any transformation in any channel, mix channels or map a non-lineal gradient to one channel.
Although this would be the case for most “photographic” CLUT, a CLUT does not require that the transformation is done as a continuous function. You can go funky or abstract with discontinuous transformations or even discrete changes.
Often you would do multiples transformations masked to target certain ranges of hue, saturation or luminosity (e.g. saturated yellows, bluish shadows, increase contrast in greens) and probably keep whole areas of the colour space unchanged (e.g. preserve highlights or skin colours).
Here’s something I’ve been working on that is a bit different. It’s a CLUT to create a skin tone mask. All of the skin tones are set to white and all of the non skin tones are set to black.
We now have 32 CLUTs available in the pack. 31 of them have been compressed and included in the G’MIC plug-in (filter Colors / Color Presets, category PIXLS.US). This is pretty cool, and already enough to be distributed as a “Pack”.
The PseudoGrey CLUT cannot be lossy compressed without losing its pseudogrey property, so I didn’t include it in the plug-in (only compressed CLUTs can appear there). It’s not too bad as we also have a filter in G’MIC for converting images in B&W with pseudogreys.
I can now generate a Pack of CLUTs, as a .zip file, containing:
The haldclut in .png format (all normalized to a 512x512 resolution, which means a 3D CLUT resolution of 64^3, which is already quite good).
The CLUTs in .cube format (Adobe ASCII format for storing CLUTs). It’s a crappy format, but I think some software can only read this. I’ve limited the CLUT size to 33^3 for the .cube files to avoid having huge files.
What we have to do next :
Decide what license we should use to distribute the Pack of CLUTs. Creative Common CC BY-SA everyone ?
Write a README file to put in the .zip archive, maybe add also a montage of all CLUTs applied on a single image, just to have a quick look of what it does ?
Set up a web page on PIXLS.US where we can put the .zip file of the PACK
My Skin Tone CLUT doesn’t really function as well as I had intended. It’s meant to create a binary mask but I think there is some interpolation that means it outputs greys.
I really only posted it as an example of something you could do with a CLUT rather than something you should do with one. There’s no harm in leaving it in, but I don’t think it is really useful.
With regards to the license, I am happy for my CLUTs to be public domain, so anything more restrictive than that is fine by me.
Oh! I thought of something for the GMIC plug-in. In the ‘apply external CLUT’ it would be fun to be able to load two CLUTs and mix them together in different proportions before applying it.