ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Search/Requests (https://www.esoui.com/forums/forumdisplay.php?f=165)
-   -   Color Picker RGB -> Hex? (https://www.esoui.com/forums/showthread.php?t=9531)

Phuein 01/02/21 04:01 PM

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

votan 01/02/21 04:14 PM

?
ehm

ZO_ColorDef

https://github.com/esoui/esoui/searc...&q=ZO_ColorDef

Baertram 01/02/21 06:20 PM

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.

Phuein 01/02/21 11:54 PM

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 :)


All times are GMT -6. The time now is 05:12 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI