Thread Tools Display Modes
01/02/21, 04:01 PM   #1
Phuein
 
Phuein's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 132
Post Color Picker RGB -> Hex?

Is there an addon that has a color picker that helps translate a visible RGB color into a HEX color we can use in chat/motd/etc?

Just thought it'd be very useful for previewing color selection quickly.
  Reply With Quote
01/02/21, 04:14 PM   #2
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
?
ehm

ZO_ColorDef

https://github.com/esoui/esoui/searc...&q=ZO_ColorDef
  Reply With Quote
01/02/21, 06:20 PM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
Previewing colorpicker colors can be done via LibAddonMenu-2.0 -> Colorpicker control e.g.
use the setFunc of the colorpicker to colorize your addon's texture/control/etc.
Or add a description LAM 2.0 control, add the reference so that it will get a unique controlName and then use this controlName.title:SetColor(yourLAMColorPickerSavedSetting.r,yourLAMColorPickerSavedSetting.g,yourLAMColorPickerSavedSetting.b,yourLAMColorPickerSavedSetting.a) in the setFunc

This way you are able to preview the color in the LAM settings panel already, and later you can apply the same saved color to your text wherever you want to use it.

To format it into hex values use the ZO_ColorDef class, function :ToHex(), :ToARGBHexadecimal() + the From* functions etc.

Last edited by Baertram : 01/02/21 at 06:26 PM.
  Reply With Quote
01/02/21, 11:54 PM   #4
Phuein
 
Phuein's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 132
I appreciate the tips, but I was just checking if any existing addon lets us preview Hex colors quickly, before editing game texts that use it, such as a guild MOTD. I'm getting the impression that there isn't one, so I'll create it
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » Color Picker RGB -> Hex?

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off