 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Sun Nov 02, 2008 10:51 am Post subject: colors check help |
|
|
right now a creating program like ACTool and it works fine now i just have to add some more commands
and right now im on adding a check color command and wondering whats the best way
should it check for RGB to check if value = blue for example or should it check for the exactly value in hex
if i should use RGB to check the color which should be the best i have another question
the 3 base colors is Blue, Green , Red
if i check an pixel and the pixel is blue does blue have the highest value then?
and how should i make a check for this because if i find another color like brown the value will be something spread out and the check will probably show wrong result
the problem with the check should be that there is so many combination that making same colors
_________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Sun Nov 02, 2008 11:13 am Post subject: |
|
|
What language? I'll assume C++.
Use getpixel to get the color at a certain pixel, which is stored in a colorref structure.
To compare colors, just compare the colorref structures.
Use GetRValue, GetGValue, and GetBValue macros to split the colorrefs into rgb.
Complete blue would be 0,0,255. However, colours are mixed to create other colors, for example 255,255,255 is white; 0,0,0 is black; 100,100,100 is a grey; 255,0,255 is a dark purple; and 125,0,125 is a light purple.
Each exact colour can only have one RGB code, but different variants of the colour have different RGB codes.
If you are asking what combinations make up certain colours, well with most, that's a matter of opinion. For example, 0,0,100 and 0,0,200 are both blues, but we would probably say that 1,0,100 is still a blue, but in fact it is a very blue purple.
For other colours like orange, it get's more complicated.
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Sun Nov 02, 2008 11:26 am Post subject: |
|
|
| --Pillboi-- wrote: | What language? I'll assume C++.
Use getpixel to get the color at a certain pixel, which is stored in a colorref structure.
To compare colors, just compare the colorref structures.
Use GetRValue, GetGValue, and GetBValue macros to split the colorrefs into rgb.
Complete blue would be 0,0,255. However, colours are mixed to create other colors, for example 255,255,255 is white; 0,0,0 is black; 100,100,100 is a grey; 255,0,255 is a dark purple; and 125,0,125 is a light purple.
Each exact colour can only have one RGB code, but different variants of the colour have different RGB codes.
If you are asking what combinations make up certain colours, well with most, that's a matter of opinion. For example, 0,0,100 and 0,0,200 are both blues, but we would probably say that 1,0,100 is still a blue, but in fact it is a very blue purple.
For other colours like orange, it get's more complicated. |
well i know everything about how to get the color and stuff it is just the part when i should check the color
and for example 1,0,100 is purple is right but for human it is blue and the check should be for human(the color should be for human) and thats make it harder :/
well i hope someone know a easy way else i have to sit down and do the dam color check for some hour probably
_________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
NothingToShow Grandmaster Cheater Supreme
Reputation: 0
Joined: 11 Jul 2007 Posts: 1579
|
Posted: Sun Nov 02, 2008 11:31 am Post subject: |
|
|
| To make it easier, you could, as you mentioned yourself, just make the user define a RGB value to search for.
|
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Sun Nov 02, 2008 11:44 am Post subject: |
|
|
| Moller wrote: | | To make it easier, you could, as you mentioned yourself, just make the user define a RGB value to search for. |
well it would be the easiest and i may do it but the fact that the script could be useless (the check color part) if they just move the window like a mm
making me thing twice since it should be a noob friendly program
(i try to improve my skills a bit so i dont always want it the easiest way because then i wont learn something new)
_________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Sun Nov 02, 2008 1:57 pm Post subject: |
|
|
| ups2000ups wrote: | | The check should be for human(the color should be for human) and thats make it harder :/ |
The problem is, as I said before, it is then a matter of opinion.
The best you can do is to decide ranges which you interpret as one colour.
For example: 0,0,20 to 0,0,255 is blue; 20,0,10 to 255,0,255 is purple.
These are just examples that may be completely incorrect, you have to decide for yourself.
Edit : Maybe this will help: http://www.vbforums.com/showthread.php?t=366592
Edit : Check this: http://www.on-the-matrix.com/webtools/HtmlColorCodes.aspx
Edit 2 : These too: http://forums.devshed.com/software-design-43/algorithm-to-determine-rgb-colour-ranges-between-2-set-colours-378911.html
http://web.njit.edu/~kevin/rgb.txt.html
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
ups2000ups I post too much
Reputation: 0
Joined: 31 Jul 2006 Posts: 2471
|
Posted: Mon Nov 03, 2008 1:42 am Post subject: |
|
|
| --Pillboi-- wrote: | | ups2000ups wrote: | | The check should be for human(the color should be for human) and thats make it harder :/ |
The problem is, as I said before, it is then a matter of opinion.
The best you can do is to decide ranges which you interpret as one colour.
For example: 0,0,20 to 0,0,255 is blue; 20,0,10 to 255,0,255 is purple.
These are just examples that may be completely incorrect, you have to decide for yourself.
Edit : Maybe this will help: http://www.vbforums.com/showthread.php?t=366592
Edit : Check this: http://www.on-the-matrix.com/webtools/HtmlColorCodes.aspx
Edit 2 : These too: http://forums.devshed.com/software-design-43/algorithm-to-determine-rgb-colour-ranges-between-2-set-colours-378911.html
http://web.njit.edu/~kevin/rgb.txt.html |
thanks
_________________
dont complain about my english...
1*1 = 2? |
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Mon Nov 03, 2008 10:36 am Post subject: |
|
|
| --Pillboi-- wrote: | To compare colors, just compare the colorref structures.
Use GetRValue, GetGValue, and GetBValue macros to split the colorrefs into rgb. |
Why do this? The RGB macro is so much simpler if you're just trying to compare.
Also COLORREF is just a dword.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|