<p>The XYZ and xyY models are extremely useful for certain operations such as manipulating RGB colour spaces to another RGB encoded colour space.</p>

<p>However, XYZ and xyY fail quite quickly in other contexts. For example, consider MacAdams ellipses that describe noticeable differences on the linear xyY scale. You could in fact apply a nonlinear, perceptually uniform transform to the xyY values and you'd likely end up closer to what you are hoping for in your circular interface element.</p>

<p>With that being said, there are needs for models that extend and build upon xyY / XYZ to tackle the psychophysical aspect of colour for evaluating such things as "colourfulness". This enters into the domain of <em>Colour Appearance Models</em>, which are capable of accurately modelling and predicting various issues surrounding brightness (luminance), lightness, colorfulness, chroma, saturation, and hue. To achieve what you are seeking, you would need to transform your data into a colour appearance model such as CIECAM02.</p>

<p>The problems cited in the other solution are in fact solved by colour appearance models such as the CIECAM02 model, including psychophysical effects that manifest as optical illusions.</p>

<ul>
<li><a href="https://en.wikipedia.org/wiki/Color_appearance_model" rel="nofollow noreferrer">Color appearance model | Wikipedia</a></li>
<li><a href="http://rit-mcsl.org/fairchild/CAM.html" rel="nofollow noreferrer">Color Appearance Models | Mark Fairchild Blog</a></li>
</ul>

CC BY-SA 4.0
2021-11-21T11:08:57.930Z
http://markfairchild.org/CAM.html
Adam
CC BY-SA 3.0
2016-11-25T15:45:42.133Z
2018-03-04T18:35:42.963Z
2018-03-04T18:35:42.963Z
troy_s
<p>There is unfortunately no good answer to this question. Simply it wont work. There is no good way to define colorful, it this context. Cie is trying to capture the physical measurement. It however does not succeed very well in relating the colors to each other.</p>

<p>Colors on the very outer arc represent spectral distributions of close to <a href="https://en.wikipedia.org/wiki/Dirac_delta_function" rel="nofollow noreferrer">Dirac delta function</a>. So one could construct a model that says that a color is very colorful when it is a Dirac delta. </p>

<p>There is a unforeseen consequence of this definition though. Namely the magenta colors do not exist as Dirac Deltas. As these colors do not exist in the spectrum. So they consist of mixture of 2 wavelengths only. This would mean they are less colorful than most other colors.</p>

<h2>Other problems</h2>

<p>Unfortunately, xyY is not perceptually uniform. So a straight line on the xyY does not represent interpolations between 2 color mixtures. Therefore making a polar transformation means you will have different color bases on same coordinates. Also precieved color do not really move over to your model. To do this properly you would need to do a extremely sophisticated transformation.</p>

<p>There are many problems with converting color to a polar coordinates in that that is exactly contrary how vision works. White is also a bit problematic in this context. The distance to full saturated signal is different for each of the 3 different cones in the eye. Hell, even what is while depends on the surrounding colors and ambient color conditions. So aim afraid your trying to force a worldview that does not exist.</p>

<h2>Finally</h2>

<p>What would this be useful for? </p>

CC BY-SA 3.0
2018-03-04T18:38:52.920Z
xyY is indeed linear, normalized.
troy_s
CC BY-SA 3.0
2018-03-04T20:51:57.023Z
@troy_s Its energetically linear, but its not linear in percieved color distance. Its just really hard to make a space that is uniform in perceptual distance between 2 points.
joojaa
CC BY-SA 3.0
2018-03-05T21:51:07.897Z
Perceptually uniform is a far better term than "linear". There is already enough stupidity around that term.
troy_s
CC BY-SA 3.0
2018-03-06T05:38:31.507Z
@troy_s Right, good name for it, changed. I was actually sitting here after answering and thinking asking a question on mathematics ehat would be the minimum requirement for linear. So as to check would linear ever eeven qualify for color.
joojaa
CC BY-SA 3.0
2015-11-21T12:04:06.943Z
2018-03-06T05:35:38.617Z
2018-03-06T05:35:38.617Z
joojaa
<p>I'm trying to make a HSV representation of the xyY color space. To calculate hue from an $(x, y)$ color, I use the angle between that color and red (wavelength 745) on the xy chromacity diagram, with white $(\frac{1}{3}, \frac{1}{3})$ as the center.</p>

<p>The saturation is the ratio between the distance between white and $(x, y)$, and white and a fully-saturated version of $(x, y)$ (which is the intersection between the line between $(\frac{1}{3}, \frac{1}{3})$ and $(x, y)$ and the edge of the chromacity diagram).</p>

<p><em>xy chromacity diagram:</em></p>

<p><img src="https://i.sstatic.net/SzQiv.png" width="300"></p>

<p>The problem that I'm having is that when I plot my color space (at value=1) and compare it to the HSV representation of RGB, the saturation (distance from center) doesn't seem to match how "colorful" the color actually is:</p>

<p><em>My color space (saturation seems wrong):</em></p>

<p><img src="https://i.sstatic.net/t1rfO.png" width="300"></p>

<p><em>HSV color space of RGB:</em></p>

<p><img src="https://i.sstatic.net/g0a9x.png" width="300"></p>

<p>How should I calculate saturation instead?</p>

<color><color-science>
What would be the correct way to calculate saturation in this case?
abcd5555
# What would be the correct way to calculate saturation in this case?

(Asked by: username_0 on 2015-11-19)

I'm trying to make a HSV representation of the xyY color space. To calculate hue from an $(x, y)$ color, I use the angle between that color and red (wavelength 745) on the xy chromacity diagram, with white $(\frac{1}{3}, \frac{1}{3})$ as the center.

The saturation is the ratio between the distance between white and $(x, y)$, and white and a fully-saturated version of $(x, y)$ (which is the intersection between the line between $(\frac{1}{3}, \frac{1}{3})$ and $(x, y)$ and the edge of the chromacity diagram).

*xy chromacity diagram:*

![](https://i.sstatic.net/SzQiv.png)

The problem that I'm having is that when I plot my color space (at value=1) and compare it to the HSV representation of RGB, the saturation (distance from center) doesn't seem to match how "colorful" the color actually is:

*My color space (saturation seems wrong):*

![](https://i.sstatic.net/t1rfO.png)

*HSV color space of RGB:*

![](https://i.sstatic.net/g0a9x.png)

How should I calculate saturation instead?

**Tags:** color, color-science


---

## 2 answers

### Answer by username_3 on 2015-11-21. Score: 5 | Accepted answer

There is unfortunately no good answer to this question. Simply it wont work. There is no good way to define colorful, it this context. Cie is trying to capture the physical measurement. It however does not succeed very well in relating the colors to each other.

Colors on the very outer arc represent spectral distributions of close to [Dirac delta function](https://en.wikipedia.org/wiki/Dirac_delta_function). So one could construct a model that says that a color is very colorful when it is a Dirac delta.

There is a unforeseen consequence of this definition though. Namely the magenta colors do not exist as Dirac Deltas. As these colors do not exist in the spectrum. So they consist of mixture of 2 wavelengths only. This would mean they are less colorful than most other colors.

## Other problems

Unfortunately, xyY is not perceptually uniform. So a straight line on the xyY does not represent interpolations between 2 color mixtures. Therefore making a polar transformation means you will have different color bases on same coordinates. Also precieved color do not really move over to your model. To do this properly you would need to do a extremely sophisticated transformation.

There are many problems with converting color to a polar coordinates in that that is exactly contrary how vision works. White is also a bit problematic in this context. The distance to full saturated signal is different for each of the 3 different cones in the eye. Hell, even what is while depends on the surrounding colors and ambient color conditions. So aim afraid your trying to force a worldview that does not exist.

## Finally

What would this be useful for?

> **Comments:**
> **username_1**: xyY is indeed linear, normalized.  
> **username_3**: @username_1 Its energetically linear, but its not linear in percieved color distance. Its just really hard to make a space that is uniform in perceptual distance between 2 points.  
> **username_1**: Perceptually uniform is a far better term than "linear". There is already enough stupidity around that term.  
> **username_3**: @username_1 Right, good name for it, changed. I was actually sitting here after answering and thinking asking a question on mathematics ehat would be the minimum requirement for linear. So as to check would linear ever eeven qualify for color.  

---

### Answer by username_1 on 2016-11-25. Score: 3

The XYZ and xyY models are extremely useful for certain operations such as manipulating RGB colour spaces to another RGB encoded colour space.

However, XYZ and xyY fail quite quickly in other contexts. For example, consider MacAdams ellipses that describe noticeable differences on the linear xyY scale. You could in fact apply a nonlinear, perceptually uniform transform to the xyY values and you'd likely end up closer to what you are hoping for in your circular interface element.

With that being said, there are needs for models that extend and build upon xyY / XYZ to tackle the psychophysical aspect of colour for evaluating such things as "colourfulness". This enters into the domain of *Colour Appearance Models*, which are capable of accurately modelling and predicting various issues surrounding brightness (luminance), lightness, colorfulness, chroma, saturation, and hue. To achieve what you are seeking, you would need to transform your data into a colour appearance model such as CIECAM02.

The problems cited in the other solution are in fact solved by colour appearance models such as the CIECAM02 model, including psychophysical effects that manifest as optical illusions.

* [Color appearance model | Wikipedia](https://en.wikipedia.org/wiki/Color_appearance_model)
* [Color Appearance Models | Mark Fairchild Blog](http://rit-mcsl.org/fairchild/CAM.html)

> **Comments:**
> **username_2**: http://markfairchild.org/CAM.html  

---

