0

Given a CIELAB color (L* A* B* values), how can the chroma (saturation) be reduced?

Chroma can be calculated as follows:

Cab= sqrt(a²+b*²)

Let's say the output is 72. How do I transform variables a and b to force chroma to be eg. 43?

bart
  • 14,958
  • 21
  • 75
  • 105
  • I’m voting to close this question because it's not a programming question but one for a different stackexchange site (which I don't have time to decide on). – Rob Sep 26 '21 at 00:28
  • I do not understand your question: the tittle is about reducing chroma, but then you ask on about finding two values (a, b) to a predefined chroma (which gives you infinite possibilities). What about just solving the math? Calculate Chroma square, so you have the factor (squared) you should apply to both a, b. If it change colour casts, you should convert to HSL/HSV and scale saturation and convert back. – Giacomo Catenazzi Sep 27 '21 at 06:48
  • @GiacomoCatenazzi If you want to reduce chroma you need to be in polar coordinates, LAB LChab or else you'll have nasty hue shifts. And neither HSL nor HSV are perceptually uniform and generally should be avoided, and if you are already in LAB space there is no reason to go into crappy polar models like HSL/HSV. It is trivial to take LAB and go in and out of LChab as I show in my answer. – Myndex Oct 01 '21 at 10:54

2 Answers2

2

Short answer: to reverse polar coordinates back to cartesian space, you need to use the HUE correlate as well. Otherwise you won't know the direction the vector is in.

More Complete Answer:

To convert ab to hue:

    hueab = 180 * atan2( a , b ) / pi();

Then to convert hue and chroma back to L*a*b*, then:

    a = Cab * cos((hueab * PI()) / 180);
    b = Cab * sin((hueab * PI()) / 180);

Saturation

You mention saturation. Chroma is not saturation.

  • Saturation is the colorfulness relative to that color's own lightness.
  • Chroma is the colorfulness relative to a separate reference white.

CIELAB does not do saturation, though other color models like CIELUV and CIECAM02 do.

CIELUV has the same L* as LAB. But LUV is based on the 1976 UCS chromaticity diagram which uses uʹvʹ coordinates, and which is a simple projection of the 1931 chromaticity diagram. LUV multiples the uʹvʹ each by 13L*, to make them u*v*.

You create hue and chroma the same way as LAB, but with LUV you can create a useful saturation correlate, which is not really possible in LAB.

To create saturation from chromau*v*:

    Suv = Cuv / Lstar;

Trivial, and to get saturation back to chroma, obviously:

    Cuv = Suv * Lstar;

Other Models

CIELAB and CIELUV both came out in 1976 (about the same time as the first Star Wars). Today we have much more accurate models like CIECAM02, CAM16, Jzazbz, ZCAM, etc. I encourage your to take a look at some of them.

Also, you might be interested in this CIELUV implementation, HSLUV which has some benefits including indication of the gamut limits while choosing colors.

https://www.hsluv.org

Myndex
  • 3,952
  • 1
  • 9
  • 24
1

Just multiply a and b by, in this case, 43/72.
Why this works: for a multiplier m,

C( m a, m b ) = sqrt( (ma)² + ((mb)² )
              = m sqrt( a² + b² )
              = m C( a, b )

In other words, in L C h coordinates:
L "lightness" stays the same,
C changes to m * C
hue = tan( b / a ) stays the same.

(a and b in CIELAB are Cartesian aka x y coordinates, C and h in CIELCh the equivalent polar coordinates.)

denis
  • 21,378
  • 10
  • 65
  • 88