Jump to content

Colors


Recommended Posts

Hello ,

I ve made a qucik program throught which i want to get colors of some spot so what it actually does it is in infinite loop and looks for the color on which you are currently by the cursor . The problem it it does not give back the hex color neighter somethink like 16711935 . I would like to ask if there is some possility to make it in programm to change into an Hex value .

Thanks for your time

Unreal

Link to comment
Share on other sites

  • Moderators

ForsakenGod ,

Look at Hex in the Help file - in your case you would use Hex(16711935, 6).

Or you could get the individual colour elements by using _ColorGetRed/Blue/Green.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

ForsakenGod ,

Look at Hex in the Help file - in your case you would use Hex(16711935, 6).

Or you could get the individual colour elements by using _ColorGetRed/Blue/Green.

M23

ohh thanks so actually i could look it up like this ?:D

$color = 16711935

$hexcolor = Hex($color , 6)

And then i can use var $hexcolor right ? :huggles:

Link to comment
Share on other sites

  • Moderators

ForsakenGod,

Have you looked at the Help file? :D If you had, you would have seen that the Hex is returned without the 0x header so you will need to add that:

$color = 16711935
$hexcolor = "0x" & Hex($color , 6)

But why are you converting the colour to Hex anyway? All the AutoIt functions work with both Decimal and Hex colours as far as I know.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

ForsakenGod,

Have you looked at the Help file? :D If you had, you would have seen that the Hex is returned without the 0x header so you will need to add that:

$color = 16711935
$hexcolor = "0x" & Hex($color , 6)

But why are you converting the colour to Hex anyway? All the AutoIt functions work with both Decimal and Hex colours as far as I know.

M23

Thanks well acually i am just learning some basics with autoit and i would like to know everythink thank you you were really helpfull :huggles:

Btw i am converting it because setting the background of laber didnt work for me with that color with hex it does :

Link to comment
Share on other sites

  • Moderators

ForsakenGod,

Could you post the code that you had problems with? :D

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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...