Sign in to follow this  
Followers 0
Simplix

ColorDialog-Value to RGB

2 posts in this topic

Hi.

I use the ObjCreate function to show a default windows color dialog. Now I´d like to split the color-value given by the color-property into its RGB parts like 255,0,0. I looked for some VB-Sample-Code to do this and do it the same way in AutoIt but it does not seem to work.

Can someone give me an AutoIt Code example?

Thanks in advance.

Share this post


Link to post
Share on other sites



Welcome to the forum,

Sure, here is an example out of the helpfile for you.

#include <Misc.au3>

$color = _ChooseColor (2, 255) ; default color selected using COLORREF rgbcolor
If (@error) Then
   MsgBox(0, "", "Error _ChooseColor: " & @error)
Else
   MsgBox(0,"_ChooseColor","Hex RGB Color: " & $color)
EndIf

Like magic. :whistle:

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  
Followers 0