Skip to content

ColorOverrides

R41z0r edited this page Jun 13, 2026 · 3 revisions

Contents

ColorOverrides manages multiple keyed color values in one row.

ColorOverrides example

Field Type Description
entries table List of { key, label } color entries.
getColor function Reads current color by key.
setColor function Writes color by key.
hasOpacity boolean Show alpha channel.
colorizeLabel boolean Tint entry labels with current colors.

getDefaultColor is currently metadata/pass-through only and is not consumed by the UI renderer.

app:RegisterControl("bars.colors", {
  id = "classColors",
  type = "coloroverrides",
  label = "Class colors",
  entries = {
    { key = "WARRIOR", label = "Warrior" },
    { key = "MAGE", label = "Mage" },
  },
  getColor = function(key)
    return MyAddonDB.profile.classColors[key]
  end,
  setColor = function(key, color)
    MyAddonDB.profile.classColors[key] = color
    MyAddon.RefreshClassColors()
  end,
})

Wiki
  • Home
  • Architecture
  • Vendoring
  • Quick Start
  • Field Glossary
  • Troubleshooting
  • Validation

Reference
  ⚬ Config API
  ⚬ UI API
  ⚬ Elements
  ⚬ Examples

Elements
  Structure
   • Category
   • Page
   • Group
   • Dashboard
   • InfoPage
   • Custom
  Controls
   • Toggle
   • CheckboxDropdown
   • Dropdown
   • MultiDropdown
   • SoundDropdown
   • Input
   • Slider
   • Button
  Advanced
   • ColorPicker
   • ColorPalette
   • ColorOverrides
   • ReorderList
   • Expandable
   • Notes

Examples
  Start
   • Minimal Addon
   • Complete Settings Center
   • Wrapper Bridge Pattern
  Data and Behavior
   • Dependent Controls
   • Nested Database Values
   • Dynamic Dropdowns
   • Runtime Refresh
   • Search and New Badges
   • Custom Hosted Editors
  Polish
   • Support Links
   • Theme Colors
   • Theme Borders

Clone this wiki locally