Color Picker - sirinsidiator/ESO-LibAddonMenu GitHub Wiki

Data Table

property type default required description
type string - yes The widget type of this control ("colorpicker")
name string - yes My Color Picker", string id or function returning a string
getFunc function - yes function() return db.r, db.g, db.b, db.a end, -- (alpha is optional)
setFunc function - yes function(r,g,b,a) db.r=r, db.g=g, db.b=b, db.a=a end, -- (alpha is optional)
tooltip number, string, function nil no "Color Picker's tooltip text.", or string id or function returning a string
width string "full" no "full" or "half" width in the panel
disabled boolean, function false no Determines if the colorpicker is disabled and its value cannot be changed
warning number, string, function nil no Shows a warning icon beside the button which has a tooltip with some warning text
requiresReload boolean false no Appends a special warning text and shows a reload button if the value is changed
default number, function nil no {r = defaults.r, g = defaults.g, b = defaults.b, a = defaults.a}, Table of default color values (or default = defaultColor, where defaultColor is a table with keys of r, g, b[, a]) or a function that returns the color
helpUrl string, function - no A string URL "https://www.esoui.com", or a function that returns one
reference string nil no A unique global reference to the control

Examples

{
  type = "colorpicker",
  name = "My Color Picker",
  tooltip = "Color Picker's tooltip text.",
  getFunc = function() return 1, 0, 0, 1 end,	--(alpha is optional)
  setFunc = function(r,g,b,a) print(r, g, b, a) end,	--(alpha is optional)
  width = "half",	--or "half" (optional)
  warning = "warning text",
},