Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to read a pixels RGB value?

Status
Not open for further replies.

KarterJK

Programmer
May 11, 2004
27
US
I want to select a color from an image colour wheel
I can get the cooridinates etc
but is there a way to read the RGB value of
a pixel at a given coordinate(x,y)?
 

Sorry - I should have answered your question, too...

Using JavaScript, you cannot get RGB values of specific pixels. The colour picker above does it by calculating what colour should be at what x and y coordinate, rather that what actually is there, I believe.

Hope this helps,
Dan
 
Thanks
I already have a routine that does that
I was trying to avoid it LOL

I was afraid the answer was going to be "no".

Thnx
 
You would have to be able to query the video card to be able to do this - something that can't be done through a browser.

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top