# Add Color

> Learn how to save brand colors to your workspace

- **URL**: https://orshot.com/docs/api-reference/brand-colors-post

---

## Overview

This endpoint allows you to save a new brand color to your workspace. Supports hex, RGB, HSL, and gradient color values.```markdown tab="Endpoint"
https://api.orshot.com/v1/brand-assets/colors/add
```## Request

<Tabs items=>
<Tab value="Hex Color">```js
await fetch("https://api.orshot.com/v1/brand-assets/colors/add", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <ORSHOT_API_KEY>",
  },
  body: JSON.stringify({
    type: "hex",
    value: "#FF5733",
    tags: ["primary", "brand"], // optional
  }),
});
```</Tab>
<Tab value="Gradient">```js
await fetch("https://api.orshot.com/v1/brand-assets/colors/add", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <ORSHOT_API_KEY>",
  },
  body: JSON.stringify({
    type: "gradient",
    value: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
    tags: ["gradient", "hero"], // optional
  }),
});
```</Tab>
<Tab value="Response">```json
{
  "data": {
    "id": 125,
    "created_at": "2025-09-11T10:15:30.123Z",
    "type": "hex",
    "value": "#FF5733",
    "workspace_id": 50,
    "user_id": "abcdef01-2345-6789-abcd-ef0123456789"
  }
}
```</Tab>
</Tabs>

## Request Parameters

| Parameter | Type     | Required | Description                                                              |
| --------- | -------- | -------- | ------------------------------------------------------------------------ |
| `value`   | String   | Yes      | The color value (e.g., `#FF5733`, `rgb(255, 87, 51)`, or a CSS gradient) |
| `type`    | String   | No       | Color type: `hex`, `rgb`, `hsl`, or `gradient`. Defaults to `hex`        |
| `tags`    | String[] | No       | Array of tags to associate with the color (e.g., `["primary", "brand"]`) |

## Supported Color Types

| Type       | Example Value                                       |
| ---------- | --------------------------------------------------- |
| `hex`      | `#FF5733`, `#FFF`, `#FF573380`                      |
| `rgb`      | `rgb(255, 87, 51)`                                  |
| `hsl`      | `hsl(11, 100%, 60%)`                                |
| `gradient` | `linear-gradient(135deg, #667eea 0%, #764ba2 100%)` |

## Notes

- Hex colors are validated for correct format (`#RGB`, `#RRGGBB`, or `#RRGGBBAA`)
- Up to 200 colors can be stored per workspace

## Rate Limits

- 30 requests per minute per endpoint