Palette Modes
Chroma Palette includes seven selection interfaces. Each mode changes how users pick hue, saturation, value, and alpha, so you can match the experience to the project, input device, or hardware budget.
Mathematical modes
These modes are rendered entirely on the GPU and do not require texture assets.
Rectangle mode
Classic HSV panel with a separate hue slider.
- Horizontal axis: saturation (0–1)
- Vertical axis: value/brightness (0–1)
- External slider: hue selection (0–360°)
- Works well for desktop and touch workflows that expect a Photoshop-style picker
using XDPaint.ChromaPalette;
using XDPaint.ChromaPalette.Core;
paletteManager.SetMode(ChromaPaletteMode.Rectangle);
Circle mode
Hue wheel with a saturation radius.
- Angle: hue (0–360°)
- Radius: saturation (0–1)
- External slider: value
- Good balance of familiarity and precision
paletteManager.SetMode(ChromaPaletteMode.Circle);
CircleFull mode
All-in-one HSV wheel using a double-cone layout.
- Center: white (value = 1)
- Outer ring: pure hues
- Edge: black (value = 0)
- Ideal when you want the picker to live in a compact UI without extra sliders
paletteManager.SetMode(ChromaPaletteMode.CircleFull);
CircleCircle mode
Hue ring surrounding a saturation/value disc.
- Outer ring: hue
- Inner disc X-axis: saturation
- Inner disc Y-axis: value
- Maintains circular gestures for both cursors—great for stylus and VR controllers
paletteManager.SetMode(ChromaPaletteMode.CircleCircle);
CircleTriangle mode
Hue ring paired with an HSV triangle.
- Outer ring: hue
- Triangle vertices: white, black, and the selected hue
- Triangle surface: full saturation/value range
- Provides high precision for art tools; assign both cursors in the inspector
paletteManager.SetMode(ChromaPaletteMode.CircleTriangle);
Note: CircleTriangle uses two cursor references:
paletteCursorfor the triangle andpaletteCursorExternalfor the hue ring.
Content-based modes
These modes sample color data from textures.
Texture mode
Samples from any Texture2D you provide.
- Use for brand palettes, captured gradients, or screenshots
- Supports bicubic sampling for smooth gradients or snapping for pixel-perfect selection
- Alpha and ignored-color filters help avoid unwanted areas
paletteManager.SetPaletteTexture(myTexture2D);
// Same as assigning the texture in Texture Mode Settings and switching to Texture mode
Palette mode
Samples from a generated ColorPalette ScriptableObject.
- Use built-in harmony types (complementary, triadic, tetradic, analogous, split-complementary, monochromatic, gradient, custom)
- Palette assets auto-regenerate when you tweak settings
- Works at edit time or runtime
using XDPaint.ChromaPalette;
using XDPaint.ChromaPalette.Core;
using XDPaint.ChromaPalette.ScriptableObjects;
[SerializeField] private ColorPickerManager paletteManager;
[SerializeField] private ColorPalette paletteAsset; // Assign in Palette Settings → Color Palette
void Start()
{
paletteAsset.GeneratePalette();
paletteManager.SetMode(ChromaPaletteMode.Palette);
}
Switching modes at runtime
using XDPaint.ChromaPalette;
using XDPaint.ChromaPalette.Core;
public class PaletteModeController : MonoBehaviour
{
[SerializeField] private ColorPickerManager paletteManager;
private ChromaPaletteMode currentMode = ChromaPaletteMode.Rectangle;
public void SetMode(int dropdownIndex)
{
currentMode = (ChromaPaletteMode)dropdownIndex;
paletteManager.SetMode(currentMode);
}
public void NextMode()
{
var modes = System.Enum.GetValues(typeof(ChromaPaletteMode));
var next = ((int)currentMode + 1) % modes.Length;
currentMode = (ChromaPaletteMode)next;
paletteManager.SetMode(currentMode);
}
}
Performance considerations
| Mode | GPU cost | Memory footprint | Notes |
|---|---|---|---|
| Rectangle | Low | Minimal | Reliable on every platform |
| Circle | Low | Minimal | Familiar hue wheel layout |
| CircleFull | Medium | Minimal | No extra sliders required |
| CircleCircle | Medium | Minimal | Dual cursors for stylus/VR |
| CircleTriangle | Medium | Minimal | Highest precision |
| Texture | Low | Depends on texture size | Use mipmapped textures for scaling |
| Palette | Low | Small generated texture | Texture rebuilt automatically |





