Hi all,(adsbygoogle = window.adsbygoogle || []).push({});

I am learning software development and I need to do something that requires some pretty good mathematics I think. I am not very good and been working to solve this problem for a few days now, any help is appreciated.

Here is what I am doing:

I need to find a way to convert pixel colors (rgb) into a 2d xy coordinates.

I know that the perfect red (255, 0, 0) color is at this position:

rx = -26;

ry = -100;

I know that the perfect green (0, 255, 0) color is at this position:

gx = -50

gy = 76

I know that the perfect blue (0, 0, 255) color is at this position:

bx = 62;

by = 10;

I know that white (0, 0, 0) is at this position:

wx = 0;

wy = 0;

I know that black (255, 255, 255) is at this position:

blx = 0;

bly = 0;

Now I need to figure our the formula to convert something like:

(234, 23, 54) to a X Y position.

This is an image of what I am developing, I have something that works right now but the formula is not right.

Vectorscope:

http://www.codeguru.com/forum/attachment.php?attachmentid=24192&stc=1&d=123284865

Can this be done ? Impossible maybe ?

Thanks alot of the help !!! *pulling hair* :)

-fred

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Help triplets to 2d conversion formula

**Physics Forums | Science Articles, Homework Help, Discussion**