Color Detection?
Author |
Message |
isaiahk9
![](http://compsci.ca/v3/uploads/user_avatars/1465120414488e669e1f83a.jpg)
|
Posted: Fri Apr 17, 2009 12:20 pm Post subject: Color Detection? |
|
|
Hey, for my final game project, I'm making a platforming fighter and was wondering about my maps/arenas. The easiest way to make maps is with color detection. Can I use color detection in Netbeans IDE 6.5? Or if anybody has any other ideas that would serve the same purpose, ty. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
matt271
![](http://compsci.ca/v3/uploads/user_avatars/1721484549ee55140af00.png)
|
Posted: Fri Apr 17, 2009 4:03 pm Post subject: Re: Color Detection? |
|
|
any colour chooser, even ms paint, will let u pick any colour off the whole range of colours. it will then give u numbers for red green and blue. in java u can say Color colour = new Color(red, green, blue); where red green and blue are numbers between 0 and 255
paint shop pro will let u take a colour off anywhere on the screen |
|
|
|
|
![](images/spacer.gif) |
[Gandalf]
![](http://compsci.ca/v3/uploads/user_avatars/189297994e4c716fec7f1.png)
|
Posted: Fri Apr 17, 2009 4:15 pm Post subject: RE:Color Detection? |
|
|
Your IDE doesn't matter, it's which version of the Java SDK you're using that makes the difference.
Look into the Robots class for whatdotcolour-like colour detection. The main difference is that the Robots class allows you to get the colour from anywhere on the screen. |
|
|
|
|
![](images/spacer.gif) |
isaiahk9
![](http://compsci.ca/v3/uploads/user_avatars/1465120414488e669e1f83a.jpg)
|
Posted: Fri Apr 17, 2009 6:13 pm Post subject: RE:Color Detection? |
|
|
@matt271 : ty, but I already know how paint can pick out colors. I was just wondering if there was a line of code similar to whatdotcolor detection. Oh well, Gandalf solved my problem.
@Gandalf : ty, Robots class is the answer. |
|
|
|
|
![](images/spacer.gif) |
|
|