PDA

View Full Version : Introduction/Explanation of XYZ color. ( > 500KB)



R0b0t1
09-09-2007, 02:57 AM
Welcome to the land of XYZ!

What is XYZ you may ask? As Wikipedia puts it:



In the study of the perception of color, one of the first mathematically defined color spaces was the CIE XYZ color space (also known as CIE 1931 color space), created by the International Commission on Illumination (CIE) in 1931.

The human eye has receptors for short (S), middle (M), and long (L) wavelengths, also known as blue, green, and red receptors. That means that one, in principle, needs three parameters to describe a color sensation. A specific method for associating three numbers (or tristimulus values) with each color is called a color space: the CIE XYZ color space is one of many such spaces. However, the CIE XYZ color space is special, because it is based on direct measurements of the human eye, and serves as the basis from which many other color spaces are defined.

The CIE XYZ color space was derived from a series of experiments done in the late 1920s by W. David Wright (Wright 1928) and John Guild (Guild 1931). Their experimental results were combined into the specification of the CIE RGB color space, from which the CIE XYZ color space was derived. This article is concerned with both of these color spaces.


Now then, WTF is that you ask? Then I say:



XYZ color, as the last part of its name implies, is another way to define color. The main difference between XYZ and RGB, HSL, and Color32, is that XYZ allows every color in the visible light spectrum to be created, by mixing its values, X, Y, and Z.


Now, if you wikipedia the phrase "XYZ color space" you will find some cryptic information, but this is the reason I am here: To dumb it down for you!

Geek Speak:
X is the value of the cyan/blue wavelength, Y of the purple/magenta, and last but least, Z, which is the value of the yellow wave. These are the three (3) wavelengths our eyes can see, respectively short, medium, and long. (X, Y, Z).

Lay Speak:
X is cyan, Y is magenta, Z is yellow.

Leet:
X 1s Cy4n; 7 3s m@9ENT4, Z is t3H YyeL1l0wz0r5.

Now, if you haven't grasped that, this may help...

http://i30.photobucket.com/albums/c350/r0b0t1/XYZexample.jpg

See? Pictures speak a thousand words.

Now, the simple way would be to download a program made to deal with XYZ color, and have it pick value for you... Nope, we do it that hard way! Go into SCAR, pick a color, and make a new script. Type in this:


program XYZExample;

Var X, Y, Z: Extended;

begin;
ColorToXYZ({Color you picked}, X, Y, Z);
WriteLn('X: '+FloatToStr(X));
WriteLn('Y: '+FloatToStr(Y));
WriteLn('Z: '+FloatToStr(Z));
end;


See how harder that was? Well, try to do it with out the procedure ColorToXYZ... Actually, don't try it. You'll get a headache.

Currently, there are no RS related applications, as said by Boreas (Should we trust him?), but if you think hard enough, you might come up with one... Well, probably not, but you could try really extra special hard, and blow up :). And after you blow up, probably the last thing you would want to know, is the comparison of XYZ to RGB. Right? All of you are uninterested of course?

http://upload.wikimedia.org/wikipedia/commons/thumb/2/22/CIExy1931_CIERGB.png/325px-CIExy1931_CIERGB.png
The colors in the triangle are RGB spectrum. All of the colors on that diagram are in XYZ color. Those blue numbers in the hundreds are the wavelengths of the respective colors.


Do you see why I took the trouble to explain XYZ color? So many possibilities... Though I'm bummed that computers produce 16 mil colors, and we percieve 12 mil! (I work in the Department of Useless Information FTW!).


I hope this helped you in one way or another, but it probably didn't :p.

EDIT: OMG! GUESS WHAT! I FOUND A USE FOR XYZ COLOR!

OMG! HEAD OVER TO THE SNIPPETS SECTION NOW! (Well, let me make it first :p Keep checking).

stupedspam
09-09-2007, 03:07 AM
Awesome tutorial, learn something I didn't know :D

~Stupedspam

Edit: Love how you make such a dull subject interesting. I'm sure someone will find a use for XYZ because nielsie95 has for RGB ;)

Santa_Clause
09-09-2007, 03:40 AM
Nice...but...I didn't really learn much. It only tells me what XYZ is...:p

R0b0t1
09-09-2007, 02:33 PM
Yes, I know. Thats because there really isn't anything to teach you about it, except what it is. If you go make an awesome XYZ idea, I could add it and explain that, but I don't have much else to explain.


EDIT: See! I even tell you it probably won't help!



I hope this helped you in one way or another, but it probably didn't :p.


Just wait until i release a HSL one.... MuwH2H4hahH!

ShowerThoughts
09-09-2007, 02:40 PM
lol i gona use this :stirthepot: never!

R0b0t1
09-09-2007, 11:37 PM
w00000000000000000T!


I think I have an Idea for XYZ color. You can check if you're in a place like Fallador, as most of the colors are white, or check if you're in a forrest, with high Y concentration.

Muwhahahahaha!

Santa_Clause
09-09-2007, 11:44 PM
Please make an RGB/HSL one...I'm dying to learn how to autocolour ;)

Edit: Seems like you already did...going to read it now.

R0b0t1
09-10-2007, 12:11 AM
Thanks Santa, I hope they make sense to you. :).


EDIT: Gawd! I hate "colour" Grrr....

mastaraymond
09-10-2007, 06:58 AM
Please make an RGB/HSL one...I'm dying to learn how to autocolour ;)

Edit: Seems like you already did...going to read it now. The principle of auto coloring is really easy: Find the right color. To do this, you can use those Color sheme's (HSL,XYZ or\and RGB). But it isn't necessary to learn how these work exactly :p. Just put in some colors in a converter, check the different and make a function ^^.

No offense to robot, ofcourse:p.

Wizzup?
09-10-2007, 07:31 AM
EDIT: OMG! GUESS WHAT! I FOUND A USE FOR XYZ COLOR!

OMG! HEAD OVER TO THE SNIPPETS SECTION NOW! (Well, let me make it first :p Keep checking).

You know I made a auto varrock road color with XYZ? :)
It has been in my VEM for some time now.

Nice tutorial.

R0b0t1
09-10-2007, 09:34 PM
It seems Wizzup? has beat me to everything. Do you program for a living?


EDIT: Did you give me the cup? I thank whoever did :p.

EDIT: Any difference/advantage if using XYZ to autocolor?

nielsie95
09-12-2007, 08:15 AM
EDIT: Any difference/advantage if using XYZ to autocolor?
ACA gives you the best color comparision method (XYZ/HSL/RGB) :)
In some situations XYZ is better..

Wizzup?
09-12-2007, 02:20 PM
It seems Wizzup? has beat me to everything. Do you program for a living?


EDIT: Did you give me the cup? I thank whoever did :p.

EDIT: Any difference/advantage if using XYZ to autocolor?

I don't program for a living, at least.. not yet.
I just felt I had to make some comments because of the Color Master signature..

R0b0t1
09-13-2007, 01:01 AM
Heh.

I'm working to it, so soon I can add a senior or retired in front of it. (I actually have different color schemes.)

Or is that a dis :p?

@Nielsie - how does it come up with the numbers ( (X < 2) ) and stuff? Just add stuff too the base from the color? Do you use the highest value to compare first?

Boreas
09-13-2007, 03:06 AM
Put a bunch of colors in it on the color tab and you will see. Hint: Look at the mins/maxs.

R0b0t1
09-13-2007, 10:23 PM
Yep :p little late Boreas, I just got Wizzup? to tell me.