Jump to content

Color triplet conversion


Recommended Posts

Is there a function to break down a pixel colour into its RGB constituent values? Has anyone written a function to do this efficiently? Alternatively, is there a function that compares a colour with another using a tolerance like PixelSearch does?

Edited by PhilHibbs
Link to comment
Share on other sites

HI,

you mean PixelGetColor ?

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

you mean PixelGetColor ?

No, that returns the pixel colour value as a single number, I want to break that number down into its three RGB constituents, e.g. if the PixelGetColor function returns 0x010203 I want the 01, 02 and 03 as separate values, presumably a 3-value array would be the way to do this. I can code it myself as a series of modulus and divide operations, or as binary mask and shift operations if those are available in AutoIt, but if someone has already invesitgated the most efficient way of doing it then I'd rather re-use that work (i.e. I'm lazy).

This sort of operation would be considerably more efficient if implemented in C rather than in a scripting language.

Edited by PhilHibbs
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...