Namespace Scylla.Core.Util.Palette
Classes
ColorAssetRegistry
Unified in-memory registry that manages every ColorPaletteAsset
and ColorGradientAsset known to the project. Built-in assets are
discovered automatically via Resources.LoadAll across every module's own
Resources/Color/Palettes and Resources/Color/Gradients folder; user
assets can be registered at runtime via RegisterPalette(ColorPaletteAsset) and
RegisterGradient(ColorGradientAsset). The registry itself is never created as a project
asset (see the "Asset model" remark below).
ColorGradient
An immutable color gradient defined by two or more ColorGradientStop entries at normalized offset positions. Supports smooth interpolation and stepped (hard-transition) modes with RGB, HSV, or Oklab color space blending.
ColorGradientAsset
ScriptableObject wrapper for a ColorGradientData, enabling gradient authoring and sharing via Unity's asset system. The gradient is editable in the Inspector and lazily converted to an immutable ColorGradient on first runtime access.
ColorPalette
An immutable, ordered collection of named UnityEngine.Color entries representing a color palette. Provides indexed access, case-insensitive name lookup, semantic role lookup, and perceptual nearest-color matching.
ColorPaletteAsset
ScriptableObject wrapper for a ColorPaletteData, enabling palette authoring and sharing via Unity's asset system. The palette is editable in the Inspector and lazily converted to an immutable ColorPalette on first runtime access.
ColorPaletteMapping
A cached mapping from one ColorPalette to another, computed using a three-step fallback resolution chain: name match, role match, perceptual nearest. Once created, the mapping can resolve colors repeatedly without recomputing.
ColorSwatchCollection
An immutable, ordered collection of named UnityEngine.Color swatches. Provides indexed access and case-insensitive name lookup. Used as the runtime representation of a ColorSwatchCollectionAsset.
ColorSwatchCollectionAsset
ScriptableObject wrapper for a ColorSwatchCollectionData, enabling the Chroma Swatches Library to be persisted as a project asset that can be committed to source control and shared across machines.
MutableColorGradient
An editable color gradient that can be modified at runtime. Supports adding, removing, and modifying stops. Call Build() to produce an immutable ColorGradient snapshot.
MutableColorPalette
An editable color palette for runtime player customization and editor tooling. Provides add, remove, rename, reorder, and color/role modification operations. Call Build() to produce an immutable ColorPalette snapshot.
Structs
ColorGradientAlphaStop
Represents a single alpha stop within a ColorGradient. Alpha stops define an independent transparency curve that is evaluated separately from the color stops and applied to the final output color.
ColorGradientAlphaStopData
Serializable data for a single gradient alpha stop, suitable for Unity Inspector editing and JSON serialization. Provides bidirectional conversion with the immutable ColorGradientAlphaStop type.
ColorGradientData
Serializable data representation of a ColorGradient, suitable for Unity Inspector editing and JSON serialization. Provides bidirectional conversion with the immutable ColorGradient type.
ColorGradientStop
Represents a single color stop within a ColorGradient. Each stop associates a normalized offset position (0-1) with an RGBA color value.
ColorGradientStopData
Serializable data for a single gradient stop, suitable for Unity Inspector editing.
ColorPaletteData
Unity-serializable data representation of a ColorPalette. Used as the backing storage for ColorPaletteAsset and as an embedded field in ScriptableObjects that need Inspector-editable palettes (e.g., ScyllaUITheme).
ColorPaletteEntry
Represents a single named color entry within a ColorPalette. Each entry associates a human-readable name with a UnityEngine.Color value and an optional ColorRole annotation.
ColorPaletteEntryData
A single serializable color entry for use in ColorPaletteData. Bridges between Unity serialization and the immutable ColorPaletteEntry.
ColorSwatchCollectionData
Unity-serializable data representation of a ColorSwatchCollection. Used as the backing storage for ColorSwatchCollectionAsset.
ColorSwatchEntryData
A single serializable swatch entry for use in ColorSwatchCollectionData. Represents a named quick-access color as used by the Chroma Swatches Library.
Enums
ColorGradientColorSpace
Defines the color space used for interpolation in a ColorGradient when the mode is Smooth.
ColorGradientMode
Defines how a ColorGradient interpolates between its ColorGradientStop entries.
ColorGradientStopInterpolation
Defines the interpolation curve applied to the transition between a ColorGradientStop and its successor. When set to None, the gradient's global interpolation behavior is used.
ColorRole
Defines semantic roles for color palette entries. Used by the fallback resolution chain when mapping colors between palettes with different naming conventions.
ColorStopBlendMode
Per-segment color blend operator applied between a ColorGradientStop and its successor. Replaces the default straight-line interpolation with a physically-motivated combine of the two endpoint colors.