> ## Documentation Index
> Fetch the complete documentation index at: https://docs.equa.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Color Endpoints

> User color preference management for UI theming

> **Source:** `equa-server/modules/api/src/endpoints/color-endpoints.ts`

# Color Endpoints

Endpoints for managing user-specific color preferences used for UI theming. Colors are scoped per user and target (e.g., a specific entity or UI element).

All color endpoints require authentication.

**Endpoint count:** 4

## Create/Update Color

```
PUT /v1/user/:user/color/:target
```

| Field        | Value             |
| ------------ | ----------------- |
| Auth         | Required          |
| Request Type | `NewColorRequest` |

Create or update a color preference for the specified target.

**Path Parameters:**

| Parameter | Type     | Description                                |
| --------- | -------- | ------------------------------------------ |
| `user`    | `uuid`   | User ID                                    |
| `target`  | `string` | Target identifier for the color preference |

**Request Body** (`NewColorRequest`):

```json theme={null}
{
  "user": "uuid",
  "target": "entity-or-element-id",
  "color": "#33AA40"
}
```

***

## List Colors

```
GET /v1/user/:user/color
```

| Field        | Value         |
| ------------ | ------------- |
| Auth         | Required      |
| Request Type | `UserRequest` |

Get all color preferences for a user.

**Path Parameters:**

| Parameter | Type   | Description |
| --------- | ------ | ----------- |
| `user`    | `uuid` | User ID     |

***

## Get Color

```
GET /v1/user/:user/color/:target
```

| Field        | Value         |
| ------------ | ------------- |
| Auth         | Required      |
| Request Type | `UserRequest` |

Get a specific color preference by target.

**Path Parameters:**

| Parameter | Type     | Description       |
| --------- | -------- | ----------------- |
| `user`    | `uuid`   | User ID           |
| `target`  | `string` | Target identifier |

***

## Delete Color

```
DELETE /v1/user/:user/color/:target
```

| Field        | Value         |
| ------------ | ------------- |
| Auth         | Required      |
| Request Type | `UserRequest` |

Delete a color preference for the specified target.

**Path Parameters:**

| Parameter | Type     | Description       |
| --------- | -------- | ----------------- |
| `user`    | `uuid`   | User ID           |
| `target`  | `string` | Target identifier |
