We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hi, I am creating an image with fine strokes, resulting in some pixels that are various shades of grey. What I want to do is go through each pixel and if it is not fully black, make it fully white. I've been using set(xx, yy, color(255)); to successfully set pixels, but when I use the "get" command, the numbers it returns aren't sensible?
How can I determine when a pixel colour is not black please??
(p.s. I know I should be using Pixels() etc but am not that advanced yet!)
thanks in advance!
Answers
https://forum.processing.org/two/discussion/8086/what-is-a-color-in-processing
Also, the reference for color:
Thanks
i am not fully sure how to solve it
did you solve it?
maybe this:
https://processing.org/reference/brightness_.html
Just use an if statement and re-write the color.
Example:
thanks! - yes this works - seems to work when using the "Pixels" construct. I now understand that color is a 32bit RGBA value :)