processing / p5.js-editor

Deprecated desktop editor for p5.js
https://p5js.org
MIT License
338 stars 91 forks source link

Color RGB - wrong values #227

Closed swhit194 closed 8 years ago

swhit194 commented 8 years ago

I'm having an issue with RGB colours from an imported JPG file. On importing an RGB Red (255,0,0) jpg from Photoshop and using get() for the (1,1) pixel coordinate, and returning this to the bottom of the editor via println I get the value of 0, 1, 255. RGB Blue from Photoshop (0,0,255) returns 0, 250, 255.

swhit194 commented 8 years ago

I've figured the funky numbers were resulting from my not having rgb in the color syntax - found how to resolve this by using (rgb(255,0,0)); syntax rather than (255,0,0) without the rgb in front. Also found that the values returned can be quite odd if this doesn't happen - closing issue as I feel I've resolved it (after several hours of research and testing).