# Models

## The HexColor object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"}}}}
```

## The ColorSpace object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"ColorSpace":{"type":"string","enum":["LCH","OKLCH","LAB","OKLAB","HSL","HSLUV","HSV","CMYK","RGB","HEX","P3"]}}}}
```

## The AlgorithmVersion object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"AlgorithmVersion":{"type":"string","enum":["v1","v2","v3"]}}}}
```

## The EasingFunction object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"EasingFunction":{"type":"string","enum":["NONE","LINEAR","EASEIN_SINE","EASEOUT_SINE","EASEINOUT_SINE","EASEIN_QUAD","EASEOUT_QUAD","EASEINOUT_QUAD","EASEIN_CUBIC","EASEOUT_CUBIC","EASEINOUT_CUBIC"]}}}}
```

## The VisionSimulationMode object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"VisionSimulationMode":{"type":"string","enum":["NONE","PROTANOMALY","PROTANOPIA","DEUTERANOMALY","DEUTERANOPIA","TRITANOMALY","TRITANOPIA","ACHROMATOMALY","ACHROMATOPSIA"]}}}}
```

## The HarmonyType object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"HarmonyType":{"type":"string","enum":["COMPLEMENTARY","ANALOGOUS","TRIADIC","SPLIT_COMPLEMENTARY","TETRADIC","SQUARE","SHADES"]}}}}
```

## The CodeFormat object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"CodeFormat":{"type":"string","enum":["css","scss","less","tailwind-v3","tailwind-v4","swift-ui","ui-kit","compose","resources","csv","native-tokens","dtcg-tokens","style-dictionary-v3","universal-json"]}}}}
```

## The PresetConfiguration object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"PresetConfiguration":{"type":"object","required":["id","name","stops","min","max","easing"],"properties":{"id":{"type":"string","description":"Unique identifier for the preset. Auto-generated if omitted on creation."},"name":{"type":"string"},"stops":{"type":"array","items":{"type":"integer","minimum":0}},"min":{"type":"number","minimum":0,"maximum":100},"max":{"type":"number","minimum":0,"maximum":100},"easing":{"$ref":"#/components/schemas/EasingFunction"}}},"EasingFunction":{"type":"string","enum":["NONE","LINEAR","EASEIN_SINE","EASEOUT_SINE","EASEINOUT_SINE","EASEIN_QUAD","EASEOUT_QUAD","EASEINOUT_QUAD","EASEIN_CUBIC","EASEOUT_CUBIC","EASEINOUT_CUBIC"]}}}}
```

## The ShiftConfiguration object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"ShiftConfiguration":{"type":"object","required":["chroma","hue"],"properties":{"chroma":{"type":"number"},"hue":{"type":"number"}}}}}}
```

## The RgbChannel object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"RgbChannel":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}}}}}}
```

## The ColorConfiguration object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"ColorConfiguration":{"type":"object","required":["name","rgb","hue","chroma","alpha"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"rgb":{"$ref":"#/components/schemas/RgbChannel"},"hue":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"chroma":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"alpha":{"type":"object","required":["isEnabled","backgroundColor"],"properties":{"isEnabled":{"type":"boolean"},"backgroundColor":{"$ref":"#/components/schemas/HexColor"}}}}},"RgbChannel":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}}},"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"}}}}
```

## The ThemeConfiguration object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"ThemeConfiguration":{"type":"object","required":["name"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"scale":{"type":"object","description":"Map of stop names to lightness values (0–100). When omitted the preset stops are used unchanged.\n","additionalProperties":{"type":"number","minimum":0,"maximum":100}},"paletteBackground":{"$ref":"#/components/schemas/HexColor"},"textColorsTheme":{"type":"object","required":["lightColor","darkColor"],"properties":{"lightColor":{"$ref":"#/components/schemas/HexColor"},"darkColor":{"$ref":"#/components/schemas/HexColor"}}},"visionSimulationMode":{"$ref":"#/components/schemas/VisionSimulationMode"},"type":{"type":"string","enum":["default theme","custom theme"]}}},"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"},"VisionSimulationMode":{"type":"string","enum":["NONE","PROTANOMALY","PROTANOPIA","DEUTERANOMALY","DEUTERANOPIA","TRITANOMALY","TRITANOPIA","ACHROMATOMALY","ACHROMATOPSIA"]}}}}
```

## The BaseConfiguration object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"BaseConfiguration":{"type":"object","required":["preset","colors"],"properties":{"preset":{"$ref":"#/components/schemas/PresetConfiguration"},"colors":{"type":"array","items":{"$ref":"#/components/schemas/ColorConfiguration"},"minItems":1}}},"PresetConfiguration":{"type":"object","required":["id","name","stops","min","max","easing"],"properties":{"id":{"type":"string","description":"Unique identifier for the preset. Auto-generated if omitted on creation."},"name":{"type":"string"},"stops":{"type":"array","items":{"type":"integer","minimum":0}},"min":{"type":"number","minimum":0,"maximum":100},"max":{"type":"number","minimum":0,"maximum":100},"easing":{"$ref":"#/components/schemas/EasingFunction"}}},"EasingFunction":{"type":"string","enum":["NONE","LINEAR","EASEIN_SINE","EASEOUT_SINE","EASEINOUT_SINE","EASEIN_QUAD","EASEOUT_QUAD","EASEINOUT_QUAD","EASEIN_CUBIC","EASEOUT_CUBIC","EASEINOUT_CUBIC"]},"ColorConfiguration":{"type":"object","required":["name","rgb","hue","chroma","alpha"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"rgb":{"$ref":"#/components/schemas/RgbChannel"},"hue":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"chroma":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"alpha":{"type":"object","required":["isEnabled","backgroundColor"],"properties":{"isEnabled":{"type":"boolean"},"backgroundColor":{"$ref":"#/components/schemas/HexColor"}}}}},"RgbChannel":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}}},"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"}}}}
```

## The TaxonomyGroupMember object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"TaxonomyGroupMember":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}
```

## The TaxonomyGroup object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"TaxonomyGroup":{"type":"object","required":["id","name","members"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyGroupMember"}}}},"TaxonomyGroupMember":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}
```

## The TaxonomySchema object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"TaxonomySchema":{"type":"object","required":["groups"],"properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyGroup"}}}},"TaxonomyGroup":{"type":"object","required":["id","name","members"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyGroupMember"}}}},"TaxonomyGroupMember":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}
```

## The TaxonomyBinding object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"TaxonomyBinding":{"type":"object","required":["path","ref"],"properties":{"path":{"type":"array","items":{"type":"string"},"description":"Hierarchical path that identifies a semantic token (e.g. `[\"brand\", \"primary\"]`).\n"},"description":{"type":"string"},"ref":{"type":"string","description":"Reference to a palette color, formatted as `<colorName>/<stop>` (e.g. `Blue/500`).\n"},"overrides":{"type":"object","description":"Per-theme stop overrides keyed by theme name.","additionalProperties":{"type":"string"}},"isExcluded":{"type":"boolean","default":false}}}}}}
```

## The SystemConfiguration object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"SystemConfiguration":{"type":"object","required":["schema"],"properties":{"schema":{"$ref":"#/components/schemas/TaxonomySchema"},"bindings":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyBinding"}}}},"TaxonomySchema":{"type":"object","required":["groups"],"properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyGroup"}}}},"TaxonomyGroup":{"type":"object","required":["id","name","members"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/TaxonomyGroupMember"}}}},"TaxonomyGroupMember":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}},"TaxonomyBinding":{"type":"object","required":["path","ref"],"properties":{"path":{"type":"array","items":{"type":"string"},"description":"Hierarchical path that identifies a semantic token (e.g. `[\"brand\", \"primary\"]`).\n"},"description":{"type":"string"},"ref":{"type":"string","description":"Reference to a palette color, formatted as `<colorName>/<stop>` (e.g. `Blue/500`).\n"},"overrides":{"type":"object","description":"Per-theme stop overrides keyed by theme name.","additionalProperties":{"type":"string"}},"isExcluded":{"type":"boolean","default":false}}}}}}
```

## The PublishedPalette object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"PublishedPalette":{"type":"object","properties":{"palette_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"preset":{"$ref":"#/components/schemas/PresetConfiguration"},"shift":{"$ref":"#/components/schemas/ShiftConfiguration"},"are_source_colors_locked":{"type":"boolean"},"colors":{"type":"array","items":{"$ref":"#/components/schemas/ColorConfiguration"}},"themes":{"type":"array","items":{"$ref":"#/components/schemas/ThemeConfiguration"}},"color_space":{"$ref":"#/components/schemas/ColorSpace"},"algorithm_version":{"$ref":"#/components/schemas/AlgorithmVersion"},"creator_full_name":{"type":"string","nullable":true},"creator_avatar_url":{"type":"string","nullable":true},"is_shared":{"type":"boolean"},"star_count":{"type":"integer"}}},"PresetConfiguration":{"type":"object","required":["id","name","stops","min","max","easing"],"properties":{"id":{"type":"string","description":"Unique identifier for the preset. Auto-generated if omitted on creation."},"name":{"type":"string"},"stops":{"type":"array","items":{"type":"integer","minimum":0}},"min":{"type":"number","minimum":0,"maximum":100},"max":{"type":"number","minimum":0,"maximum":100},"easing":{"$ref":"#/components/schemas/EasingFunction"}}},"EasingFunction":{"type":"string","enum":["NONE","LINEAR","EASEIN_SINE","EASEOUT_SINE","EASEINOUT_SINE","EASEIN_QUAD","EASEOUT_QUAD","EASEINOUT_QUAD","EASEIN_CUBIC","EASEOUT_CUBIC","EASEINOUT_CUBIC"]},"ShiftConfiguration":{"type":"object","required":["chroma","hue"],"properties":{"chroma":{"type":"number"},"hue":{"type":"number"}}},"ColorConfiguration":{"type":"object","required":["name","rgb","hue","chroma","alpha"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"rgb":{"$ref":"#/components/schemas/RgbChannel"},"hue":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"chroma":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"alpha":{"type":"object","required":["isEnabled","backgroundColor"],"properties":{"isEnabled":{"type":"boolean"},"backgroundColor":{"$ref":"#/components/schemas/HexColor"}}}}},"RgbChannel":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}}},"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"},"ThemeConfiguration":{"type":"object","required":["name"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"scale":{"type":"object","description":"Map of stop names to lightness values (0–100). When omitted the preset stops are used unchanged.\n","additionalProperties":{"type":"number","minimum":0,"maximum":100}},"paletteBackground":{"$ref":"#/components/schemas/HexColor"},"textColorsTheme":{"type":"object","required":["lightColor","darkColor"],"properties":{"lightColor":{"$ref":"#/components/schemas/HexColor"},"darkColor":{"$ref":"#/components/schemas/HexColor"}}},"visionSimulationMode":{"$ref":"#/components/schemas/VisionSimulationMode"},"type":{"type":"string","enum":["default theme","custom theme"]}}},"VisionSimulationMode":{"type":"string","enum":["NONE","PROTANOMALY","PROTANOPIA","DEUTERANOMALY","DEUTERANOPIA","TRITANOMALY","TRITANOPIA","ACHROMATOMALY","ACHROMATOPSIA"]},"ColorSpace":{"type":"string","enum":["LCH","OKLCH","LAB","OKLAB","HSL","HSLUV","HSV","CMYK","RGB","HEX","P3"]},"AlgorithmVersion":{"type":"string","enum":["v1","v2","v3"]}}}}
```

## The MyPublishedPalette object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"MyPublishedPalette":{"allOf":[{"$ref":"#/components/schemas/PublishedPalette"},{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"published_at":{"type":"string","format":"date-time"}}}]},"PublishedPalette":{"type":"object","properties":{"palette_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"preset":{"$ref":"#/components/schemas/PresetConfiguration"},"shift":{"$ref":"#/components/schemas/ShiftConfiguration"},"are_source_colors_locked":{"type":"boolean"},"colors":{"type":"array","items":{"$ref":"#/components/schemas/ColorConfiguration"}},"themes":{"type":"array","items":{"$ref":"#/components/schemas/ThemeConfiguration"}},"color_space":{"$ref":"#/components/schemas/ColorSpace"},"algorithm_version":{"$ref":"#/components/schemas/AlgorithmVersion"},"creator_full_name":{"type":"string","nullable":true},"creator_avatar_url":{"type":"string","nullable":true},"is_shared":{"type":"boolean"},"star_count":{"type":"integer"}}},"PresetConfiguration":{"type":"object","required":["id","name","stops","min","max","easing"],"properties":{"id":{"type":"string","description":"Unique identifier for the preset. Auto-generated if omitted on creation."},"name":{"type":"string"},"stops":{"type":"array","items":{"type":"integer","minimum":0}},"min":{"type":"number","minimum":0,"maximum":100},"max":{"type":"number","minimum":0,"maximum":100},"easing":{"$ref":"#/components/schemas/EasingFunction"}}},"EasingFunction":{"type":"string","enum":["NONE","LINEAR","EASEIN_SINE","EASEOUT_SINE","EASEINOUT_SINE","EASEIN_QUAD","EASEOUT_QUAD","EASEINOUT_QUAD","EASEIN_CUBIC","EASEOUT_CUBIC","EASEINOUT_CUBIC"]},"ShiftConfiguration":{"type":"object","required":["chroma","hue"],"properties":{"chroma":{"type":"number"},"hue":{"type":"number"}}},"ColorConfiguration":{"type":"object","required":["name","rgb","hue","chroma","alpha"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"rgb":{"$ref":"#/components/schemas/RgbChannel"},"hue":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"chroma":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"alpha":{"type":"object","required":["isEnabled","backgroundColor"],"properties":{"isEnabled":{"type":"boolean"},"backgroundColor":{"$ref":"#/components/schemas/HexColor"}}}}},"RgbChannel":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}}},"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"},"ThemeConfiguration":{"type":"object","required":["name"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"scale":{"type":"object","description":"Map of stop names to lightness values (0–100). When omitted the preset stops are used unchanged.\n","additionalProperties":{"type":"number","minimum":0,"maximum":100}},"paletteBackground":{"$ref":"#/components/schemas/HexColor"},"textColorsTheme":{"type":"object","required":["lightColor","darkColor"],"properties":{"lightColor":{"$ref":"#/components/schemas/HexColor"},"darkColor":{"$ref":"#/components/schemas/HexColor"}}},"visionSimulationMode":{"$ref":"#/components/schemas/VisionSimulationMode"},"type":{"type":"string","enum":["default theme","custom theme"]}}},"VisionSimulationMode":{"type":"string","enum":["NONE","PROTANOMALY","PROTANOPIA","DEUTERANOMALY","DEUTERANOPIA","TRITANOMALY","TRITANOPIA","ACHROMATOMALY","ACHROMATOPSIA"]},"ColorSpace":{"type":"string","enum":["LCH","OKLCH","LAB","OKLAB","HSL","HSLUV","HSV","CMYK","RGB","HEX","P3"]},"AlgorithmVersion":{"type":"string","enum":["v1","v2","v3"]}}}}
```

## The PublishPaletteBody object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"PublishPaletteBody":{"type":"object","required":["name","preset","shift","colors","themes","color_space","algorithm_version"],"properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"preset":{"$ref":"#/components/schemas/PresetConfiguration"},"shift":{"$ref":"#/components/schemas/ShiftConfiguration"},"are_source_colors_locked":{"type":"boolean","default":false},"colors":{"type":"array","items":{"$ref":"#/components/schemas/ColorConfiguration"},"minItems":1},"themes":{"type":"array","items":{"$ref":"#/components/schemas/ThemeConfiguration"},"minItems":1},"color_space":{"$ref":"#/components/schemas/ColorSpace"},"algorithm_version":{"$ref":"#/components/schemas/AlgorithmVersion"},"is_shared":{"type":"boolean","default":false}}},"PresetConfiguration":{"type":"object","required":["id","name","stops","min","max","easing"],"properties":{"id":{"type":"string","description":"Unique identifier for the preset. Auto-generated if omitted on creation."},"name":{"type":"string"},"stops":{"type":"array","items":{"type":"integer","minimum":0}},"min":{"type":"number","minimum":0,"maximum":100},"max":{"type":"number","minimum":0,"maximum":100},"easing":{"$ref":"#/components/schemas/EasingFunction"}}},"EasingFunction":{"type":"string","enum":["NONE","LINEAR","EASEIN_SINE","EASEOUT_SINE","EASEINOUT_SINE","EASEIN_QUAD","EASEOUT_QUAD","EASEINOUT_QUAD","EASEIN_CUBIC","EASEOUT_CUBIC","EASEINOUT_CUBIC"]},"ShiftConfiguration":{"type":"object","required":["chroma","hue"],"properties":{"chroma":{"type":"number"},"hue":{"type":"number"}}},"ColorConfiguration":{"type":"object","required":["name","rgb","hue","chroma","alpha"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"rgb":{"$ref":"#/components/schemas/RgbChannel"},"hue":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"chroma":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"alpha":{"type":"object","required":["isEnabled","backgroundColor"],"properties":{"isEnabled":{"type":"boolean"},"backgroundColor":{"$ref":"#/components/schemas/HexColor"}}}}},"RgbChannel":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}}},"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"},"ThemeConfiguration":{"type":"object","required":["name"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"scale":{"type":"object","description":"Map of stop names to lightness values (0–100). When omitted the preset stops are used unchanged.\n","additionalProperties":{"type":"number","minimum":0,"maximum":100}},"paletteBackground":{"$ref":"#/components/schemas/HexColor"},"textColorsTheme":{"type":"object","required":["lightColor","darkColor"],"properties":{"lightColor":{"$ref":"#/components/schemas/HexColor"},"darkColor":{"$ref":"#/components/schemas/HexColor"}}},"visionSimulationMode":{"$ref":"#/components/schemas/VisionSimulationMode"},"type":{"type":"string","enum":["default theme","custom theme"]}}},"VisionSimulationMode":{"type":"string","enum":["NONE","PROTANOMALY","PROTANOPIA","DEUTERANOMALY","DEUTERANOPIA","TRITANOMALY","TRITANOPIA","ACHROMATOMALY","ACHROMATOPSIA"]},"ColorSpace":{"type":"string","enum":["LCH","OKLCH","LAB","OKLAB","HSL","HSLUV","HSV","CMYK","RGB","HEX","P3"]},"AlgorithmVersion":{"type":"string","enum":["v1","v2","v3"]}}}}
```

## The UpdatePaletteBody object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"UpdatePaletteBody":{"type":"object","description":"All fields are optional; only the supplied ones are updated.","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"preset":{"$ref":"#/components/schemas/PresetConfiguration"},"shift":{"$ref":"#/components/schemas/ShiftConfiguration"},"are_source_colors_locked":{"type":"boolean"},"colors":{"type":"array","items":{"$ref":"#/components/schemas/ColorConfiguration"},"minItems":1},"themes":{"type":"array","items":{"$ref":"#/components/schemas/ThemeConfiguration"},"minItems":1},"color_space":{"$ref":"#/components/schemas/ColorSpace"},"algorithm_version":{"$ref":"#/components/schemas/AlgorithmVersion"},"is_shared":{"type":"boolean"}}},"PresetConfiguration":{"type":"object","required":["id","name","stops","min","max","easing"],"properties":{"id":{"type":"string","description":"Unique identifier for the preset. Auto-generated if omitted on creation."},"name":{"type":"string"},"stops":{"type":"array","items":{"type":"integer","minimum":0}},"min":{"type":"number","minimum":0,"maximum":100},"max":{"type":"number","minimum":0,"maximum":100},"easing":{"$ref":"#/components/schemas/EasingFunction"}}},"EasingFunction":{"type":"string","enum":["NONE","LINEAR","EASEIN_SINE","EASEOUT_SINE","EASEINOUT_SINE","EASEIN_QUAD","EASEOUT_QUAD","EASEINOUT_QUAD","EASEIN_CUBIC","EASEOUT_CUBIC","EASEINOUT_CUBIC"]},"ShiftConfiguration":{"type":"object","required":["chroma","hue"],"properties":{"chroma":{"type":"number"},"hue":{"type":"number"}}},"ColorConfiguration":{"type":"object","required":["name","rgb","hue","chroma","alpha"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"rgb":{"$ref":"#/components/schemas/RgbChannel"},"hue":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"chroma":{"type":"object","required":["shift","isLocked"],"properties":{"shift":{"type":"number"},"isLocked":{"type":"boolean"}}},"alpha":{"type":"object","required":["isEnabled","backgroundColor"],"properties":{"isEnabled":{"type":"boolean"},"backgroundColor":{"$ref":"#/components/schemas/HexColor"}}}}},"RgbChannel":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}}},"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"},"ThemeConfiguration":{"type":"object","required":["name"],"properties":{"id":{"type":"string","description":"Auto-generated if omitted."},"name":{"type":"string"},"scale":{"type":"object","description":"Map of stop names to lightness values (0–100). When omitted the preset stops are used unchanged.\n","additionalProperties":{"type":"number","minimum":0,"maximum":100}},"paletteBackground":{"$ref":"#/components/schemas/HexColor"},"textColorsTheme":{"type":"object","required":["lightColor","darkColor"],"properties":{"lightColor":{"$ref":"#/components/schemas/HexColor"},"darkColor":{"$ref":"#/components/schemas/HexColor"}}},"visionSimulationMode":{"$ref":"#/components/schemas/VisionSimulationMode"},"type":{"type":"string","enum":["default theme","custom theme"]}}},"VisionSimulationMode":{"type":"string","enum":["NONE","PROTANOMALY","PROTANOPIA","DEUTERANOMALY","DEUTERANOPIA","TRITANOMALY","TRITANOPIA","ACHROMATOMALY","ACHROMATOPSIA"]},"ColorSpace":{"type":"string","enum":["LCH","OKLCH","LAB","OKLAB","HSL","HSLUV","HSV","CMYK","RGB","HEX","P3"]},"AlgorithmVersion":{"type":"string","enum":["v1","v2","v3"]}}}}
```

## The MistralColor object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"MistralColor":{"type":"object","required":["name","hex","rgb"],"properties":{"name":{"type":"string"},"hex":{"$ref":"#/components/schemas/HexColor"},"rgb":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"integer","minimum":0,"maximum":255},"g":{"type":"integer","minimum":0,"maximum":255},"b":{"type":"integer","minimum":0,"maximum":255}}},"description":{"type":"string"}}},"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"}}}}
```

## The MistralColorPalette object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"MistralColorPalette":{"type":"object","required":["primary","text","success","warning","alert"],"properties":{"primary":{"$ref":"#/components/schemas/MistralColor"},"text":{"$ref":"#/components/schemas/MistralColor"},"success":{"$ref":"#/components/schemas/MistralColor"},"warning":{"$ref":"#/components/schemas/MistralColor"},"alert":{"$ref":"#/components/schemas/MistralColor"}}},"MistralColor":{"type":"object","required":["name","hex","rgb"],"properties":{"name":{"type":"string"},"hex":{"$ref":"#/components/schemas/HexColor"},"rgb":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"integer","minimum":0,"maximum":255},"g":{"type":"integer","minimum":0,"maximum":255},"b":{"type":"integer","minimum":0,"maximum":255}}},"description":{"type":"string"}}},"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"}}}}
```

## The Channel object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"Channel":{"type":"object","description":"Color channel values as defined by `@a_ng_d/utils-ui-color-palette`. At minimum provide an `rgb` object; additional channels (lch, oklch, etc.) may be included.\n","properties":{"rgb":{"$ref":"#/components/schemas/RgbChannel"}},"additionalProperties":true},"RgbChannel":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}}}}}}
```

## The HarmonyColors object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"HarmonyColors":{"type":"object","description":"A set of colors forming the requested harmony. Keys depend on the harmony type (e.g. `complementary`, `analogous1`, `analogous2`). Values follow the `Channel` shape and include both `rgb` and `hex` representations when `returnFormat` is `both`.\n","additionalProperties":true}}}}
```

## The DominantColor object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"DominantColor":{"type":"object","properties":{"hex":{"$ref":"#/components/schemas/HexColor"},"rgb":{"$ref":"#/components/schemas/RgbChannel"},"population":{"type":"number","description":"Relative frequency of this color in the image (0–1)."}}},"HexColor":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"},"RgbChannel":{"type":"object","required":["r","g","b"],"properties":{"r":{"type":"number","minimum":0,"maximum":1},"g":{"type":"number","minimum":0,"maximum":1},"b":{"type":"number","minimum":0,"maximum":1}}}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"UI Color Palette API","version":"1.0.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ui-color-palette.com/api-reference/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
