Jump to content
Sign in to follow this  
buzz44

_ChooseColor()

Recommended Posts

buzz44

The optional parametre, $i_colorref, in the ChooseColor() function is passed as BGR when it should be RGB, correct? See below

#include <Misc.au3>

$color = _ChooseColor (2, 0xFF0000); << Red
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","Hex RGB Color: " & $color)
EndIf

qq

Share this post


Link to post
Share on other sites
GaryFrost

that's a hex number not a colorref, red would be 255, example of yellow would be 65535

Edit: one way to get your colorref from a rgb hex is to reverse the r and b in the hex 0xFF0000 becomes 0x0000FF then turn it into a ref by Int(0x0000FF) which will give you 255.

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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  

×