FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Programs
(Moderators: fry, REAS)
   match colors
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: match colors  (Read 351 times)
mkff


match colors
« on: Feb 15th, 2005, 12:45pm »

is there any simple way to match a given pixelcolor width  
a colorrange (e.g. darkred to light red) (like threshold)
 
regards,
Ingolf
 
mkff


Re: match colors
« Reply #1 on: Feb 15th, 2005, 3:41pm »

ok i try to reply myself
 
i think the easiest way to match a color to a color range is to use a specific HUE value (like "0" for red) and a saturation value (like "150" for light-red). next you have to define a threshold value like 25 (it is to define the range) for saturation and 5 or so for the hue level..
 
 
the rest is a simple contruct of "if" statements.
 
hope this will help.  
« Last Edit: Feb 15th, 2005, 3:45pm by mkff »  
Pages: 1 

« Previous topic | Next topic »