Enum ColorRole
Defines semantic roles for color palette entries. Used by the fallback resolution chain when mapping colors between palettes with different naming conventions.
Namespace: Scylla.Core.Util.Palette
Assembly: ScyllaCore.dll
Syntax
public enum ColorRole
Remarks
Retro/generic palettes typically leave all entries at None. UI theme palettes annotate entries with semantic roles (e.g., Primary, Background) to enable role-based mapping when switching themes.
The resolution chain tries name match first, then role match, then perceptual nearest. Role annotations provide the middle tier of resolution accuracy.
Fields
| Name | Description |
|---|---|
| Accent | Accent highlight color (e.g., hover states). |
| AccentForeground | Text/icon color on accent backgrounds. |
| Background | Page or screen background color. |
| Border | Border and divider color. |
| Card | Card/panel background color. |
| CardForeground | Text/icon color on card backgrounds. |
| Destructive | Destructive/error/danger background color. |
| DestructiveForeground | Text/icon color on destructive backgrounds. |
| Error | Game-specific: error indicator color. |
| Foreground | Primary text and foreground element color. |
| Info | Game-specific: informational indicator color. |
| Muted | Muted/disabled background color. |
| MutedForeground | Muted text color (placeholders, disabled text). |
| None | No semantic role. Default for retro/generic palette entries. |
| Primary | Primary brand color (e.g., main button background). |
| PrimaryForeground | Text/icon color on primary backgrounds. |
| Ring | Focus ring color for accessibility indicators. |
| Secondary | Secondary/subtle background color. |
| SecondaryForeground | Text/icon color on secondary backgrounds. |
| Success | Game-specific: positive/success indicator color. |
| Warning | Game-specific: caution/warning indicator color. |