Codeboard.
Technical referenceAPI signaturesData shapes

Palettes types

Data shapes for palettes. See all type groups for other domains and shared units. Import public types from codeboard-studio; helper shapes are included to explain nested values.

ColorChannel

Code
export type ColorChannel = "color" | "fill" | "stroke";

ColorBinding

Code
export interface ColorBinding {
    swatchId: string;
    override?: string | undefined;
}

PaletteSwatch

Code
export interface PaletteSwatch {
    id: string;
    name: string;
    color: string;
}

Palette

Code
export interface Palette {
    id: string;
    name: string;
    swatches: PaletteSwatch[];
}

PaletteBindingUsage

Code
export interface PaletteBindingUsage {
    ownerKind: "panel" | "component" | "animation";
    ownerId: string;
    layerId: string;
    elementId: string;
    channel: ColorChannel;
    swatchId: string;
    override?: string;
}

On this page