# ColorMagic

> Search the color palettes people have generated on ColorMagic, the free AI color palette generator, by mood, theme, season, style or color: ocean, pastel, 70s, wedding. Every palette comes back as five hex codes ready for a design brief, a slide, a chart or a CSS variable, with its name, its tags, how many people liked it and a link to it on ColorMagic. Take the whole list, the most liked match, or one at random for a palette of the day. No account or API key required.

App · Images & Design · 4 actions. Web page: https://docs.lodol.com/docs/integrations/colormagic

## Actions

### Check service status

Check whether ColorMagic is answering, and how quickly, by running a small search. This is the one action that reports a problem as a value instead of failing the step, so a workflow can branch on it and fall back to a saved palette when the service is down. Being throttled is reported separately from being down. No API key required.

**Inputs**: None.

**Outputs**

- `message` (text): What happened, in a sentence worth posting.
- `online` (true/false): True when the service answered with a list of palettes. This is the field to branch on.
- `palettes_found` (number): How many palettes the probe search for blue matched, or null when the service did not answer with a list.
- `rate_limited` (true/false): True when the answer was a throttle (HTTP 429). Being throttled is not the same as being down.
- `reachable` (true/false): True when something answered at all, even with an error. False means the request never landed.
- `response_time_ms` (number): How long the request took, in milliseconds, or null when nothing came back.
- `status_code` (number): The HTTP status that came back, or null when nothing did.

**Example output**

```json
{
  "message": "ColorMagic is up and serving palettes: 20 matched 'blue'.",
  "online": true,
  "palettes_found": 20,
  "rate_limited": false,
  "reachable": true,
  "response_time_ms": 42.7,
  "status_code": 200
}
```

### Find a palette

Get the one palette on ColorMagic that best fits a search: the most liked match by default, or the newest, or the first the service returns. The step for a workflow that wants a palette to use rather than a list to choose from. Keep only palettes carrying one tag. Fails when nothing matches, so a step downstream never posts an empty palette. No API key required.

**Inputs**

- Search for (`query`, text, required): A word or short phrase to search palettes for. ColorMagic matches it against palette names and tags, so a color (green), a mood (calm), a season (autumn), a style (retro, pastel, 70s) or a subject (ocean, wedding, coffee shop) all work.
- Must carry the tag (`tag`, text): Optional. Keep only the palettes that carry this tag, as it appears in a palette's tags: a color, a mood, a season or a style, such as pastel, warm, spring or vintage. Case does not matter. Use it to narrow a broad search, e.g. search for green and keep only pastel.
- Pick (`pick`, text): Optional. Which of the matching palettes to return. Most liked is the one the most people liked; newest is the most recently generated; first is the top result in ColorMagic's own order. Most liked by default. One of: `most_liked` (Most liked), `newest`, `first` (First result). Default: `most_liked`.

**Outputs**

- `palette` (object): One palette: five colors with a name, tags and likes.
- `pick` (text): How the palette was chosen: most_liked, newest or first.
- `query` (text): The search that was run, as it was sent.
- `tag` (text): The tag the palettes were required to carry, lower-case, or null when none was asked for.
- `total_matches` (number): How many palettes ColorMagic matched to the search, before the tag filter and any limit.

**Example output**

```json
{
  "palette": {
    "colors": [
      "#44562f",
      "#83934d",
      "#b7c88d",
      "#e9dfb4",
      "#efbfb3"
    ],
    "colors_text": "#44562f, #83934d, #b7c88d, #e9dfb4, #efbfb3",
    "created_at": "2024-10-28T18:20:29.406Z",
    "id": "671fd5edab6cc866507fe7cf",
    "likes": 454,
    "name": "Florest Moth",
    "normalized_hash": "a2ff2c8e68ef3cf69ee27ded00c4ad5e7d5deed82b05688f3976801b960482ea",
    "tags": [
      "earthy",
      "olive",
      "green",
      "khaki",
      "beige",
      "pastel",
      "soft",
      "muted",
      "neutral",
      "warm"
    ],
    "url": "https://colormagic.app/palette/671fd5edab6cc866507fe7cf"
  },
  "pick": "most_liked",
  "query": "green",
  "tag": null,
  "total_matches": 5
}
```

### Get a random palette

Get one palette chosen at random from those on ColorMagic matching a search. A different palette every run, so a palette of the day for a channel, a newsletter or a mood board does not repeat itself. Keep only palettes carrying one tag. Fails when nothing matches. No API key required.

**Inputs**

- Search for (`query`, text, required): A word or short phrase to search palettes for. ColorMagic matches it against palette names and tags, so a color (green), a mood (calm), a season (autumn), a style (retro, pastel, 70s) or a subject (ocean, wedding, coffee shop) all work.
- Must carry the tag (`tag`, text): Optional. Keep only the palettes that carry this tag, as it appears in a palette's tags: a color, a mood, a season or a style, such as pastel, warm, spring or vintage. Case does not matter. Use it to narrow a broad search, e.g. search for green and keep only pastel.

**Outputs**

- `palette` (object): One palette: five colors with a name, tags and likes.
- `query` (text): The search that was run, as it was sent.
- `tag` (text): The tag the palettes were required to carry, lower-case, or null when none was asked for.
- `total_matches` (number): How many palettes ColorMagic matched to the search, before the tag filter and any limit.

**Example output**

```json
{
  "palette": {
    "colors": [
      "#44562f",
      "#83934d",
      "#b7c88d",
      "#e9dfb4",
      "#efbfb3"
    ],
    "colors_text": "#44562f, #83934d, #b7c88d, #e9dfb4, #efbfb3",
    "created_at": "2024-10-28T18:20:29.406Z",
    "id": "671fd5edab6cc866507fe7cf",
    "likes": 454,
    "name": "Florest Moth",
    "normalized_hash": "a2ff2c8e68ef3cf69ee27ded00c4ad5e7d5deed82b05688f3976801b960482ea",
    "tags": [
      "earthy",
      "olive",
      "green",
      "khaki",
      "beige",
      "pastel",
      "soft",
      "muted",
      "neutral",
      "warm"
    ],
    "url": "https://colormagic.app/palette/671fd5edab6cc866507fe7cf"
  },
  "query": "green",
  "tag": null,
  "total_matches": 5
}
```

### Search palettes

Search the palettes people have generated on ColorMagic by a word or phrase: a color, a mood, a season, a style or a subject, such as ocean, pastel, 70s or wedding. Each palette comes back with its five hex codes, its name, its tags, its likes and a link to its page. Keep only palettes carrying one tag, sort them by relevance, likes or age, and choose how many to return. No API key required.

**Inputs**

- Search for (`query`, text, required): A word or short phrase to search palettes for. ColorMagic matches it against palette names and tags, so a color (green), a mood (calm), a season (autumn), a style (retro, pastel, 70s) or a subject (ocean, wedding, coffee shop) all work.
- Must carry the tag (`tag`, text): Optional. Keep only the palettes that carry this tag, as it appears in a palette's tags: a color, a mood, a season or a style, such as pastel, warm, spring or vintage. Case does not matter. Use it to narrow a broad search, e.g. search for green and keep only pastel.
- Sort by (`sort`, text): Optional. The order to return the palettes in. Relevance is ColorMagic's own order; most liked puts the palettes the most people liked first; newest puts the most recently generated first. Relevance by default. One of: `relevance`, `most_liked` (Most liked), `newest`. Default: `relevance`.
- Number of palettes (`limit`, number): Optional. At most how many palettes to return, between 1 and 100; 20 by default. ColorMagic decides how many a search matches; this only trims the list. From 1 to 100. Default: `20`.

**Outputs**

- `count` (number): How many palettes are in the list, after the tag filter and the limit.
- `palettes` (list): The palettes, in the order asked for.
- `query` (text): The search that was run, as it was sent.
- `sort` (text): The order the palettes are in: relevance, most_liked or newest.
- `tag` (text): The tag the palettes were required to carry, lower-case, or null when none was asked for.
- `total_matches` (number): How many palettes ColorMagic matched to the search, before the tag filter and any limit.

**Example output**

```json
{
  "count": 1,
  "palettes": [
    {
      "colors": [
        "#44562f",
        "#83934d",
        "#b7c88d",
        "#e9dfb4",
        "#efbfb3"
      ],
      "colors_text": "#44562f, #83934d, #b7c88d, #e9dfb4, #efbfb3",
      "created_at": "2024-10-28T18:20:29.406Z",
      "id": "671fd5edab6cc866507fe7cf",
      "likes": 454,
      "name": "Florest Moth",
      "normalized_hash": "a2ff2c8e68ef3cf69ee27ded00c4ad5e7d5deed82b05688f3976801b960482ea",
      "tags": [
        "earthy",
        "olive",
        "green",
        "khaki",
        "beige",
        "pastel",
        "soft",
        "muted",
        "neutral",
        "warm"
      ],
      "url": "https://colormagic.app/palette/671fd5edab6cc866507fe7cf"
    }
  ],
  "query": "green",
  "sort": "relevance",
  "tag": null,
  "total_matches": 5
}
```
