-
-
Notifications
You must be signed in to change notification settings - Fork 11
Color Binders
A Color Binder is a component that binds a named theme color to a specific visual target (Image, Light, TextMeshPro, etc.). When the active theme changes, all binders automatically update their target's color.

These binders bind one theme color to a single component. They extend GenericColorBinder<T>.
| Binder | Target Component | Description |
|---|---|---|
ImageColorBinder |
Image |
UI Image color |
SpriteRendererColorBinder |
SpriteRenderer |
2D sprite color |
TextMeshProColorBinder |
TextMeshProUGUI |
TextMeshPro text color |
LightColorBinder |
Light |
Light color |
ShadowColorBinder |
Shadow |
UI Shadow effect color |
OutlineColorBinder |
Outline |
UI Outline effect color |
LineRendererColorBinder |
LineRenderer |
Line renderer start/end color |
These binders bind multiple theme colors to a single component. They extend GenericMultiColorBinder<T>.
| Binder | Target Component | Color Entries |
|---|---|---|
SelectableColorBinder |
Selectable |
Normal, Highlighted, Pressed, Selected, Disabled |
ButtonColorBinder |
Button |
Normal, Highlighted, Pressed, Selected, Disabled |
ToggleColorBinder |
Toggle |
Normal, Highlighted, Pressed, Selected, Disabled |
Multi-color binders let you assign a different theme color to each state. For example, a SelectableColorBinder has 5 color slots — one for each ColorBlock state.
These binders bind a theme color to a Renderer's material color. They extend GenericRendererColorBinder<T>, which itself extends GenericMultiColorBinder<T>.
| Binder | Target Component | Description |
|---|---|---|
RendererColorBinder |
Renderer |
Any renderer's material color |
MeshRendererColorBinder |
MeshRenderer |
Mesh renderer material color |
SkinnedMeshRendererColorBinder |
SkinnedMeshRenderer |
Skinned mesh material color |
SpriteShapeRendererColorBinder |
SpriteShapeRenderer |
Sprite shape material color |
Renderer binders support a custom material property option. By default they set the material's main color, but you can enable useCustomProperty and specify a shader property name like _BaseColor, _EmissionColor, etc.
This is useful when working with custom shaders or URP/HDRP Lit materials where the main color property is _BaseColor rather than _Color.
Every binder has a Required variant with a [RequireComponent] attribute that ensures the target component exists on the GameObject.
| Standard | Required Variant |
|---|---|
ImageColorBinder |
ImageColorBinderRequired |
SpriteRendererColorBinder |
SpriteRendererColorBinderRequired |
TextMeshProColorBinder |
TextMeshProColorBinderRequired |
LightColorBinder |
LightColorBinderRequired |
ShadowColorBinder |
ShadowColorBinderRequired |
OutlineColorBinder |
OutlineColorBinderRequired |
LineRendererColorBinder |
LineRendererColorBinderRequired |
RendererColorBinder |
RendererColorBinderRequired |
MeshRendererColorBinder |
MeshRendererColorBinderRequired |
SkinnedMeshRendererColorBinder |
SkinnedMeshRendererColorBinderRequired |
SpriteShapeRendererColorBinder |
SpriteShapeRendererColorBinderRequired |
SelectableColorBinder |
SelectableColorBinderRequired |
ButtonColorBinder |
ButtonColorBinderRequired |
ToggleColorBinder |
ToggleColorBinderRequired |
Use Required variants when you want Unity to automatically add the target component if it's missing.
All binders support an alpha override via ColorBinderData. When enabled, the binder replaces the alpha channel of the theme color with a custom value. This lets you share a color across components that need different transparency levels.
In the Inspector, check Override Alpha and set the desired alpha value (0–1).
- Select a GameObject in the scene or prefab
- Click Add Component
- Search for "Theme/" — all binders are in the
Theme/component menu category - Select the binder that matches your target component
The binder automatically finds the target component on the same GameObject. Use the color dropdown to select which named theme color to bind.
- Custom Binders — Create binders for components not covered above
- C# API Reference — Programmatic access to themes and colors
Unity-Theme v4.3.0 | MIT License | by Ivan Murzak