{"openapi":"3.1.0","info":{"title":"PickShade color API","version":"1.0.0","description":"Free color API: parse, convert, contrast (WCAG 2 and APCA), gamut, names, scales, harmonies, mixing, palettes, color blindness and design token export. Color math follows CSS Color 4. No key needed."},"servers":[{"url":"https://pickshade.com"}],"paths":{"/api/v1/parse-color":{"get":{"operationId":"parse_color_get","summary":"Describe a color","description":"Read any color and describe it: HEX, RGB, HSL and OKLCH values, the closest human name, the closest Tailwind class, its hue family, whether it fits sRGB and Display P3, and which text color, white or black, reads better on it.","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"color","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},{"name":"locale","in":"query","required":false,"schema":{"default":"en","description":"Language for color names","type":"string","enum":["en","ru"]}}]},"post":{"operationId":"parse_color","summary":"Describe a color","description":"Read any color and describe it: HEX, RGB, HSL and OKLCH values, the closest human name, the closest Tailwind class, its hue family, whether it fits sRGB and Display P3, and which text color, white or black, reads better on it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"color":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"locale":{"default":"en","description":"Language for color names","type":"string","enum":["en","ru"]}},"required":["color"]},"example":{"color":"oklch(62% 0.21 260)"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/convert-color":{"get":{"operationId":"convert_color_get","summary":"Convert a color","description":"Convert a color between formats: hex, rgb, hsl, hsv, hwb, cmyk, lab, lch, oklab, oklch, display-p3, rec2020, xyz and platform code (swiftui, uikit, flutter, android). Values follow CSS Color 4.","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"color","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},{"name":"formats","in":"query","required":false,"schema":{"description":"Formats to return. Defaults to hex, rgb, hsl, oklch, oklab and display-p3","minItems":1,"maxItems":21,"type":"array","items":{"type":"string","enum":["hex","rgb","hsl","hsv","hwb","cmyk","lab","lch","oklab","oklch","display-p3","rec2020","a98-rgb","prophoto-rgb","srgb-linear","xyz-d65","xyz-d50","swiftui","uikit","flutter","android"]}}}]},"post":{"operationId":"convert_color","summary":"Convert a color","description":"Convert a color between formats: hex, rgb, hsl, hsv, hwb, cmyk, lab, lch, oklab, oklch, display-p3, rec2020, xyz and platform code (swiftui, uikit, flutter, android). Values follow CSS Color 4.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"color":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"formats":{"description":"Formats to return. Defaults to hex, rgb, hsl, oklch, oklab and display-p3","minItems":1,"maxItems":21,"type":"array","items":{"type":"string","enum":["hex","rgb","hsl","hsv","hwb","cmyk","lab","lch","oklab","oklch","display-p3","rec2020","a98-rgb","prophoto-rgb","srgb-linear","xyz-d65","xyz-d50","swiftui","uikit","flutter","android"]}}},"required":["color"]},"example":{"color":"#ff5733","formats":["oklch","hsl","cmyk"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/check-contrast":{"get":{"operationId":"check_contrast_get","summary":"Check text contrast","description":"Check text contrast against a background with both WCAG 2 (ratio, AA and AAA for normal and large text) and APCA (Lc value and the usage level it allows). Also suggests the nearest text color that passes AA and AAA while keeping its hue.","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"text","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Text or foreground color"}},{"name":"background","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Background color"}}]},"post":{"operationId":"check_contrast","summary":"Check text contrast","description":"Check text contrast against a background with both WCAG 2 (ratio, AA and AAA for normal and large text) and APCA (Lc value and the usage level it allows). Also suggests the nearest text color that passes AA and AAA while keeping its hue.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":120,"description":"Text or foreground color"},"background":{"type":"string","minLength":1,"maxLength":120,"description":"Background color"}},"required":["text","background"]},"example":{"text":"#6b7280","background":"#ffffff"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/check-gamut":{"get":{"operationId":"check_gamut_get","summary":"Check gamut","description":"Check whether a color fits the sRGB, Display P3 and Rec. 2020 gamuts, and get the closest sRGB fallback that keeps lightness and hue (CSS Color 4 gamut mapping in OKLCH).","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"color","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}}]},"post":{"operationId":"check_gamut","summary":"Check gamut","description":"Check whether a color fits the sRGB, Display P3 and Rec. 2020 gamuts, and get the closest sRGB fallback that keeps lightness and hue (CSS Color 4 gamut mapping in OKLCH).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"color":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},"required":["color"]},"example":{"color":"oklch(70% 0.3 145)"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/nearest-names":{"get":{"operationId":"nearest_names_get","summary":"Find color names","description":"Find the closest named colors, CSS color keywords and Tailwind CSS classes for a color, ranked by perceptual distance (deltaE OK).","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"color","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},{"name":"limit","in":"query","required":false,"schema":{"default":5,"type":"integer","minimum":1,"maximum":20}},{"name":"locale","in":"query","required":false,"schema":{"default":"en","description":"Language for color names","type":"string","enum":["en","ru"]}}]},"post":{"operationId":"nearest_names","summary":"Find color names","description":"Find the closest named colors, CSS color keywords and Tailwind CSS classes for a color, ranked by perceptual distance (deltaE OK).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"color":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"limit":{"default":5,"type":"integer","minimum":1,"maximum":20},"locale":{"default":"en","description":"Language for color names","type":"string","enum":["en","ru"]}},"required":["color"]},"example":{"color":"#1e3a8a","limit":3}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/compare-colors":{"get":{"operationId":"compare_colors_get","summary":"Compare two colors","description":"Compare two colors: CIEDE2000 and deltaE OK difference with a plain verdict (identical, nearly, similar, different, opposite), lightness shift in percent, chroma and hue shift, and the contrast between them.","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"first","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},{"name":"second","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}}]},"post":{"operationId":"compare_colors","summary":"Compare two colors","description":"Compare two colors: CIEDE2000 and deltaE OK difference with a plain verdict (identical, nearly, similar, different, opposite), lightness shift in percent, chroma and hue shift, and the contrast between them.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"first":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"second":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},"required":["first","second"]},"example":{"first":"teal","second":"turquoise"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/generate-scale":{"get":{"operationId":"generate_scale_get","summary":"Generate a 50–950 scale","description":"Build an 11-step tint and shade scale (50, 100 … 900, 950) from one color in OKLCH, the same shape as Tailwind palettes, with even perceived lightness steps.","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"color","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}}]},"post":{"operationId":"generate_scale","summary":"Generate a 50–950 scale","description":"Build an 11-step tint and shade scale (50, 100 … 900, 950) from one color in OKLCH, the same shape as Tailwind palettes, with even perceived lightness steps.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"color":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},"required":["color"]},"example":{"color":"#3b82f6"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/harmonies":{"get":{"operationId":"harmonies_get","summary":"Color harmonies","description":"Get color harmonies for a base color, computed in OKLCH so lightness stays even: complementary, split-complementary, analogous, triadic, tetradic, square and monochromatic.","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"color","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},{"name":"kind","in":"query","required":false,"schema":{"description":"One harmony. All harmonies when omitted","type":"string","enum":["complementary","split-complementary","analogous","triadic","tetradic","square","monochromatic"]}}]},"post":{"operationId":"harmonies","summary":"Color harmonies","description":"Get color harmonies for a base color, computed in OKLCH so lightness stays even: complementary, split-complementary, analogous, triadic, tetradic, square and monochromatic.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"color":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"kind":{"description":"One harmony. All harmonies when omitted","type":"string","enum":["complementary","split-complementary","analogous","triadic","tetradic","square","monochromatic"]}},"required":["color"]},"example":{"color":"#ff5733","kind":"triadic"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/mix-colors":{"get":{"operationId":"mix_colors_get","summary":"Mix two colors","description":"Mix two colors at a ratio in a chosen color space, like CSS color-mix(). OKLab keeps the middle bright, sRGB tends to turn gray. Returns the result and a ready color-mix() expression.","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"first","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},{"name":"second","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},{"name":"amount","in":"query","required":false,"schema":{"default":50,"description":"Share of the second color in percent","type":"number","minimum":0,"maximum":100}},{"name":"space","in":"query","required":false,"schema":{"default":"oklab","type":"string","enum":["oklab","oklch","srgb","srgb-linear","lab","lch","hsl","hwb"]}}]},"post":{"operationId":"mix_colors","summary":"Mix two colors","description":"Mix two colors at a ratio in a chosen color space, like CSS color-mix(). OKLab keeps the middle bright, sRGB tends to turn gray. Returns the result and a ready color-mix() expression.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"first":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"second":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"amount":{"default":50,"description":"Share of the second color in percent","type":"number","minimum":0,"maximum":100},"space":{"default":"oklab","type":"string","enum":["oklab","oklch","srgb","srgb-linear","lab","lch","hsl","hwb"]}},"required":["first","second"]},"example":{"first":"#ff5733","second":"#3b82f6","amount":30,"space":"oklab"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/generate-palette":{"get":{"operationId":"generate_palette_get","summary":"Generate a palette","description":"Generate a harmonious palette in OKLCH. Keep colors you already have, pick a style (auto, analogous, complementary, triadic, monochromatic, pastel, vivid, muted, dark) and pass a seed to get the same palette every time.","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"keep","in":"query","required":false,"schema":{"description":"Colors that must stay in the palette, in order","maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}}},{"name":"mode","in":"query","required":false,"schema":{"default":"auto","type":"string","enum":["auto","analogous","complementary","triadic","monochromatic","pastel","vivid","muted","dark"]}},{"name":"size","in":"query","required":false,"schema":{"default":5,"type":"integer","minimum":2,"maximum":10}},{"name":"seed","in":"query","required":false,"schema":{"description":"Any text. The same seed gives the same palette","type":"string","maxLength":100}}]},"post":{"operationId":"generate_palette","summary":"Generate a palette","description":"Generate a harmonious palette in OKLCH. Keep colors you already have, pick a style (auto, analogous, complementary, triadic, monochromatic, pastel, vivid, muted, dark) and pass a seed to get the same palette every time.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"keep":{"description":"Colors that must stay in the palette, in order","maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},"mode":{"default":"auto","type":"string","enum":["auto","analogous","complementary","triadic","monochromatic","pastel","vivid","muted","dark"]},"size":{"default":5,"type":"integer","minimum":2,"maximum":10},"seed":{"description":"Any text. The same seed gives the same palette","type":"string","maxLength":100}}},"example":{"keep":["#0f172a"],"mode":"analogous","size":5,"seed":"brand"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/simulate-cvd":{"get":{"operationId":"simulate_cvd_get","summary":"Simulate color blindness","description":"Show how colors look with protanopia, deuteranopia, tritanopia and achromatopsia (Machado 2009 at full severity), and list the pairs that become hard to tell apart.","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"colors","in":"query","required":true,"schema":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}}},{"name":"kinds","in":"query","required":false,"schema":{"minItems":1,"type":"array","items":{"type":"string","enum":["protanopia","deuteranopia","tritanopia","achromatopsia"]}}}]},"post":{"operationId":"simulate_cvd","summary":"Simulate color blindness","description":"Show how colors look with protanopia, deuteranopia, tritanopia and achromatopsia (Machado 2009 at full severity), and list the pairs that become hard to tell apart.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"colors":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},"kinds":{"minItems":1,"type":"array","items":{"type":"string","enum":["protanopia","deuteranopia","tritanopia","achromatopsia"]}}},"required":["colors"]},"example":{"colors":["#e11d48","#16a34a","#2563eb"]}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/export-tokens":{"post":{"operationId":"export_tokens","summary":"Export colors as code","description":"Turn a list of colors into ready code: CSS custom properties, a Tailwind v4 @theme block, SCSS variables, JSON, W3C design tokens (DTCG), a JavaScript array or an SVG swatch strip. Unnamed colors get their closest color name.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"colors":{"minItems":1,"maxItems":24,"type":"array","items":{"type":"object","properties":{"color":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"name":{"description":"Token name","type":"string","minLength":1,"maxLength":60}},"required":["color"]}},"format":{"default":"css","type":"string","enum":["css","tailwind","scss","json","dtcg","array","svg"]},"values":{"default":"oklch","description":"How color values are written","type":"string","enum":["oklch","hex","rgb","hsl","display-p3"]}},"required":["colors"]},"example":{"colors":[{"color":"#0f172a","name":"ink"},{"color":"#f97316"}],"format":"tailwind","values":"oklch"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}},"/api/v1/build-system":{"get":{"operationId":"build_system_get","summary":"Build a design system","description":"Build a full color system from a brand color: 50–950 scales for primary, secondary, accent, neutral and status colors, light and dark theme roles, exported as a Tailwind v4 theme, CSS variables, shadcn/ui globals.css or DTCG tokens, with a contrast audit of text and surface pairs.","responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}},"parameters":[{"name":"primary","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Brand or primary color"}},{"name":"secondary","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},{"name":"accent","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},{"name":"neutral","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"}},{"name":"name","in":"query","required":false,"schema":{"default":"Brand","type":"string","minLength":1,"maxLength":60}},{"name":"format","in":"query","required":false,"schema":{"default":"tailwind","type":"string","enum":["tailwind","css","shadcn","dtcg"]}},{"name":"values","in":"query","required":false,"schema":{"default":"oklch","type":"string","enum":["oklch","hex","rgb","hsl","display-p3"]}}]},"post":{"operationId":"build_system","summary":"Build a design system","description":"Build a full color system from a brand color: 50–950 scales for primary, secondary, accent, neutral and status colors, light and dark theme roles, exported as a Tailwind v4 theme, CSS variables, shadcn/ui globals.css or DTCG tokens, with a contrast audit of text and surface pairs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"primary":{"type":"string","minLength":1,"maxLength":120,"description":"Brand or primary color"},"secondary":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"accent":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"neutral":{"type":"string","minLength":1,"maxLength":120,"description":"Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500"},"name":{"default":"Brand","type":"string","minLength":1,"maxLength":60},"format":{"default":"tailwind","type":"string","enum":["tailwind","css","shadcn","dtcg"]},"values":{"default":"oklch","type":"string","enum":["oklch","hex","rgb","hsl","display-p3"]}},"required":["primary"]},"example":{"primary":"#6d4aff","format":"shadcn"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{}}},"400":{"description":"Invalid input","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Too many requests. See the Retry-After header"}}}}},"components":{"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"}}}}}}