Computer Science Canada

color detection

Author:  BenLi [ Wed Jun 28, 2006 10:35 am ]
Post subject:  color detection

I'm using whatdotcoor to detect color at a given point. However, it works when i use "black" for the color and not when i use "255" for the color? Anyone know how to solve this problem?

Author:  Mazer [ Wed Jun 28, 2006 1:16 pm ]
Post subject: 

Well, that's the trouble (or, one trouble, of many) with Turing. You've got 256 colours to work with, but alot of them look very much the same (in fact, maybe they are the same). So, I suppose that whatdotcolour() goes through it's list of 256 colours and if the colour in question looks like a colour it recognizes, that colour is returned. And if black (7, I think) is close enough it will be returned and 255 is never even reached.

Author:  Slaivis [ Wed Jun 28, 2006 2:29 pm ]
Post subject: 

Mazer wrote:
Well, that's the trouble (or, one trouble, of many) with Turing. You've got 256 colours to work with, but alot of them look very much the same (in fact, maybe they are the same). So, I suppose that whatdotcolour() goes through it's list of 256 colours and if the colour in question looks like a colour it recognizes, that colour is returned. And if black (7, I think) is close enough it will be returned and 255 is never even reached.


Yes, some of the colours are infact the same. I'm not sure if it will help, but here's a program I wrote to detect colours and show their Turing values:

Author:  BenLi [ Wed Jun 28, 2006 3:55 pm ]
Post subject: 

lol thx, i wrote one of those too, they come in handy


: