Jump to content

pixelgetcolor


Recommended Posts

;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 :)

Link to comment
Share on other sites

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
Link to comment
Share on other sites

_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???
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...