Jump to content
Sign in to follow this  
qwertylol

pixelgetcolor

Recommended Posts

qwertylol

how do I get the values in hex?

Share this post


Link to post
Share on other sites
qwertylol

how do I get the values in hex?

and, how do I express the value return by pixelgetcolor by the R, G, b?

Share this post


Link to post
Share on other sites
qwertylol

the other post doesn't have a solution to how to express the number returned in 3 numbers :)

Share this post


Link to post
Share on other sites
Gif

Firstly :

_StringToHex() and _HexToString()

then look at functions and au3Lib for infos...

Edited by c4nm7

Share this post


Link to post
Share on other sites
qwertylol

i tried to look in autolib, please tell me which function in the lib is what I need

thank you !

Share this post


Link to post
Share on other sites
qwertylol

;Dim $pic = PixelGetColor ( 17, 387 )

;MsgBox (0, "title", $pic )
#include <String.au3>
Dim $origin_x = 11
Dim $origin_y = 680

Dim $x_offset = 0
Dim $y_offset = 0


Dim $target_pixel = PixelGetColor ( ($origin_x + $x_offset ),($origin_y + $y_offset ))



MsgBox (0, "title", $target_pixel )

$target_pixel = _StringToHex($target_pixel )

MsgBox (0, "title", $target_pixel )

this is not a hex :)

Share this post


Link to post
Share on other sites
Zedna

Look at my get_color.au3 project.

It's in my signature.

EDIT:

mainly

Func ZjistiBarvy()
    $pos = MouseGetPos()
    $color = PixelGetColor($pos[0], $pos[1])
    $color_txt = StringFormat('%03i %03i %03i', _ColorGetRed($Color), _ColorGetGreen($Color), _ColorGetBlue($Color))
    $color_hex = "0x" & Hex($color, 6)
    
    Return $color_hex & @CRLF & $color_txt & @CRLF & $color
EndFunc
Edited by Zedna

Share this post


Link to post
Share on other sites
qwertylol

_ColorGetRed($Color), _ColorGetGreen($Color), _ColorGetBlue($Color)

I think these three functions will do for me; how do I find color.au3 ?

Share this post


Link to post
Share on other sites
BrettF

_ColorGetRed($Color), _ColorGetGreen($Color), _ColorGetBlue($Color)

I think these three functions will do for me; how do I find color.au3 ?

Its in the include dir of the autoit install???

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×