what RGB is blue?
Geoff Canyon Rev
gcanyon+rev at gmail.com
Fri Jul 1 11:24:50 EDT 2011
I guess I'm playing devil's advocate, but if you were testing for
"blue"-ness, wouldn't you convert to HSV and compare the H, regardless of S
or V?
gc
On Fri, Jul 1, 2011 at 4:52 AM, Mark Schonewille <
m.schonewille at economy-x-talk.com> wrote:
> Tiemo,
>
> The distance between any colour (1) and a colour chosen by you (2; e.g.
> r=0, g=0, b=255) can be calculated as
>
> sqrt((r1-r2)^2+(g1-g2)^2+(b1-b2)^2) <= T
>
> where T is a threshold between 0 and 442 set by you. Change the colour of
> the background pixel whenever the distance between the colour of that pixel
> and your selected colour is less than the threshold.
>
> I use this technique in Color Converter http://www.color-converter.com
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> New: Download the Installer Maker Plugin 1.6 for LiveCode here
> http://qery.us/ce
>
> On 1 jul 2011, at 11:39, Tiemo Hollmann TB wrote:
>
> > Hello,
> >
> > I am taking the mousecolor at different points from an image by script
> (not
> > by clicking). I would like to analyse if the color I've taken is a "kind
> of
> > blue", or another color. I want to change the backgroundcolor of an
> image.
> > The background is always blue, but different blues and changing over the
> > background. So what I want to do is to verify, what is background and
> what
> > is foreground of my image.
> >
> > 100% pure blue would be 0,0,255. But for a human being 25,75,130
> (greyblue)
> > is also still blue, but 240,20,180 is pink, though the third RGB value is
> > higher as in my greyblue.
> >
> > So I can't just check only the third RGB value, neither the sum or cross
> > total. Has anybody ever heard, if you can define at all by math "what is
> > blue"?
> >
> > Any color specialist around here?
> >
> > Tiemo
> >
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list