Talk:Colorfulness

From Wikipedia, the free encyclopedia

This article is supported by the Color WikiProject, a project that provides a central approach to Color-related subjects on Wikipedia. Help us improve articles to good and 1.0 standards; visit the wikiproject page for more details.
Start This article has been rated as start-Class on the quality scale.
??? This article has been rated as -importance on the importance scale.

Contents

[edit] Saturation in RGB space is wrong

The first formula gives sqrt(2/3) for r=1,g=0,b=0 -- not 1 as one would expect. It can be reduced to sqrt(2/3*(rr+gg+bb-rg-rb-bg)). Note that by using this formula yellow, cyan and magenta are never fully saturated. They all have values of sqrt(2/3). It appears the intent was to give the distance from the 0,0,0 to 1,1,1 line, which would be sqrt(2*(rr+gg+bb-rg-rb-bg)). Normalizing this yields sqrt(rr+gg+bb-rg-rb-bg), and fully saturated red, green, blue, yellow, cyan and magenta all return 1. Both pure white (1,1,1) and pure black (0,0,0) return 0.

In any case the second formula of (max(r,g,b)-min(r,g,b))/3(R+G+B) is what all software I have ever seen uses. Red, green, and blue have a saturation value of 1/3. Yellow, cyan and magenta have a saturation value of 1/6. Again, white and black both have a saturation value of 0.

—Preceding unsigned comment added by Spitzak (talkcontribs) but heavily modified by Wm 04:37, 4 September 2007 (UTC), which he shouldn't have done

[edit] Correct formula

If no values of R,G,B = 0, then saturation = Sqrt[(R-1)^2+(G-1)^2+(B-1)^2]/Sqrt[3]. This is the distance from white(RGB(1,1,1)).

If one value of R,G,B = 0, the problem becomes finding the distance to white in the relevent plane (e.g. if B=0, then saturation = Sqrt[(R-1)^2+(G-1)^2]/Sqrt[2]).

If two values are zero, then saturation equals the value present minus one.

Note that all values pass the test: Red, green, blue, yellow, cyan, magenta, and black all equal 1. White yields 0. This algorithm works because of the way we desaturate a specific color in RGB, namely, we manipulate only nonzero values. R,G,B values of zero mean that the corresponding primary is fully desaturated and will stay that way as we move toward the fully unsaturated RGB value of that particular color (white). In other words, if B=0, then moving R and G proportionally toward 0 desaturates yellow.

Wm 04:37, 4 September 2007 (UTC)

A "correct formula" without a source is worthless. This one is worthless anyway, since it's so discontinuous at the gamut edges. Dicklyon 05:31, 4 September 2007 (UTC)

[edit] Correct formula, part 2

I'm getting a little frustrated by Wiki.

Anyway, the source is in the derivation above. It uses the following three definitions of saturation, which actually agree. Give me some time and I'll find in Wiki where the three definitions are actually equivalent:

1. Vividness of hue; degree of difference from a gray of the same lightness or brightness. Also called intensity. Dictionary.com

2. The vividness of a color's hue. Saturation measures the degree to which a color differs from a gray of the same darkness or lightness. Dictionary.com

3. In optics, the degree which colors of the same wavelength are differentiated from one another on the basis of purity which correlates with the amount of white present, such as red from pink. Dictionary.com

Here's some Mathematica code, if you're interested:

f3[r_, g_, b_] := Module[{num = 3, ret = 0, r1 = r, g1 = g, b1 = b},

     num = num - If[r == 0, 1, 0];
     If[r == 0, r1 = 1];
     num = num - If[g == 0, 1, 0];
     If[g == 0, g1 = 1];
     num = num - If[b == 0, 1, 0];
     If[b == 0, b1 = 1];
     If[num == 0, Return[1],
       Return[Sqrt[(r1 - 1)^2 + (g1 - 1)^2 + (b1 - 1)^2]/Sqrt[num]]
       ];
     ];

Anyway, this is consistent with the definition of saturation. If it's not useful, well, sorry. Anything else needs to be called something other than saturation.

Sorry about the trouble I've caused. This is my first experience with Wiki.

Wm 08:04, 4 September 2007 (UTC)

A source is an independent book or article, not your derivation. Without a citation, the information cannot be persuasive. The reason I say it's worthless is that it gives very different answers for the saturation of for example (1,.5,epsilon) and (1,.5,0), for epsilon near zero, which get saturations of approximately .5/Sqrt[3] and .5/Sqrt[2] respectively. A usable formula would not have such discontinuities at gamut edges. I have a hard time interpreting this as anything but your own WP:OR. Dicklyon 15:22, 4 September 2007 (UTC)

[edit] moved to colorfulness

I've moved this article to "colorfulness", and will try in the next few days to put some better explanations up of the similarities and differences between saturation, chroma, and colorfulness. Maybe it would be worth emailing Mark Fairchild to ask for advice/diagrams/etc. This article could really generally use some better sourcing. --jacobolus (t) 20:50, 19 September 2007 (UTC)

What is the justification for this? Of the three terms (colorfulness, chroma, saturation), you used the least known. Google gives their ratios as 46:5100:27000. I myself had never heard of the term and I thought I knew something about color science. What do other people think?--Adoniscik (talk) 16:21, 18 January 2008 (UTC)
Well, I put it here for a couple of reasons. First, chroma and saturation are both frequently used very sloppily, for a wide variety of (not-so-) similar concepts, by different authors and different models (for instance, HSL, HSV, and CIECAM02 have 3 wildly different understandings of saturation). These are terms with centuries of contradictory baggage hanging from them. Second, I expect is for precisely this reason that the CIECAM02 model chooses the word colorfulness, rather than chroma, to describe the most “obvious” measure of color intensity. Ideally written, this article would more fully explain what colorfulness means in that context. Third, the general meaning of the word colorfulness is immediately obvious to readers, so those who are redirected from one of the other two is least disoriented, in my opinion, by leaving “colorfulness” as the title. Finally, both saturation and chroma are terms in wide use outside color science, and as their main articles are disambiguation pages, with the color science titles requiring parenthetical disambiguation (“saturation (color theory)” or whatever). This title lacks that aesthetic flaw. --jacobolus (t) 16:48, 18 January 2008 (UTC)
I think the main problem is not the name, but that the article is not currently well organized or comprehensive enough, to explain the full range of meanings of all these terms as used in various contexts. Once that is done, I think the title will be fine. To be honest, I don't care that strongly about it; any reasonably accurate title is fine, and I don't think it's an issue worth arguing over too much. Improving the article should be a much higher priority. --jacobolus (t) 16:59, 18 January 2008 (UTC)
My curiosity piqued, I looked it up in "Introduction to Color Imaging Science": Colorfulness is an absolute measure of hue intensity which increases with illumination level. This does not appear to agree with our definition, which claims it is a color measure relative to gray.--Adoniscik (talk) 17:10, 18 January 2008 (UTC)
I think we should email Mark Fairchild for advice, seeing as he is both the foremost expert, and very open to answering questions. But I don't have time to do that today. --jacobolus (t) 17:20, 18 January 2008 (UTC)

[edit] Excitation Purity

There is no explanation of the qmax function in the above section. It would be great if someone that knows how to compute this would add either the formula or a reference. I tried google and didn't find anything. Dhoerl 13:26, 5 October 2007 (UTC)

I provided an explanation and uploaded an image, but it looked ugly so I did not embed it. Can anybody send me a message to tell me why the colors spill outside the triangle? The image I derived it from just does not look the same in Inkscape as it does on the Web. Or you can upload a better picture yourself. --Adoniscik (talk) 22:44, 30 January 2008 (UTC)
tell me why the colors spill outside the triangle? — because SVG implementations are universally buggy and incomplete, and the bugs/missing parts of Inkscape's version differ from those in other implementations. --jacobolus (t) 01:02, 31 January 2008 (UTC)
So much for vector graphics hehe. Is Illustrator any better? If not I will just do it in PNG. --Adoniscik (talk) 02:14, 31 January 2008 (UTC)