Color Harmony API

This API allows you to generate color schemes based on a given color. You can specify the color schemes to generate, as well as the formats to return the colors in.

GET/api/v1/color-harmony

Making A Request

  • Name
    colors
    Type
    string
    Description

    A color to be used for the base of the color scheme.

  • Name
    formats
    Type
    string || string[] || undefined
    Description

    The formats to return the blended color in. Defaults to hex, rgb, and hsl.

  • Name
    schemes
    Type
    string || string[] || undefined
    Description

    Optional. Specify the color schemes to generate (e.g., "analogous,monochromatic").

Making a request

GET
/api/v1/color-harmony
curl "https://palettespro.com/api/v1/color-harmony?color=<COLOR_VALUE>&formats=<FORMATS>&schemes=<SCHEMES>"

Example Response

{
  "analogous": [
    {"hsl": {"h": 0, "s": 100, "l": 50}, "hex": "#ff0000", "rgb": {"r": 255, "g": 0, "b": 0}},
    ...
  ],
  "complementary": [
    {"hsl": {"h": 180, "s": 100, "l": 50}, "hex": "#00ffff", "rgb": {"r": 0, "g": 255, "b": 255}},
    ...
  ],
  ...
}

Example Error Response

{
  "error": "Invalid color format."
}

Color Harmony Demo

Was this page helpful?