# Palettes

### Format

Palettes can be created either in-app or manually. They are stored as human readable .json files that you can create yourself or edit in a text editor. For example:

```
{
    "colors": [
        {
            "color": "#2fcd71",
            "swatchName": "#2fcd71"
        },
        {
            "color": "#ccba6e",
            "swatchName": "#ccba6e"
        },
        {
            "color": "#3aaef0",
            "swatchName": "#3aaef0"
        },
        {
            "color": "#b2b2b2",
            "swatchName": "#b2b2b2"
        }
    ],
    "name": "Cavalry",
    "version": 1.0
}
```

`"colors"` is an array of hex values. You can set your hex value within `"color"`. `"swatchName"` is not currently used in the UI so can be left blank if preferred. e.g. `"swatchName": ""`

`"name"` is the name of your palette as it will appear in the Library Palette drop down.

`"version"` can be used for compatibility in the future.

### Storing Palettes

The default Library Palettes are stored as .pal files in:

**macOS** - `~/Library/Application Support/Cavalry/Palettes`

**Windows -** `C:\Users\USERNAME\AppData\Roaming\Cavalry\Palettes`

Further libraries of palettes can also be created simply by creating a new directory inside the Palettes directory above. For example, adding a directory called `Scene Group` inside the `Palettes` directory would create a new **Library** called `Scene Group` that can be accessed and loaded via the **Options menu** in the [Color Window](https://scenegroup.gitbook.io/cavalry/user-interface/menus/window-menu/color-palette).

{% hint style="warning" %}
Only directories one level below the Palettes directory are supported and a directory must contain at least one palette to appear in the Color Window options.&#x20;
{% endhint %}

Palettes can also be saved as part of a **Project** when using [Project Settings](https://scenegroup.gitbook.io/cavalry/user-interface/menus/window-menu/asset-window/project-settings). By default, this directory is `@project/Assets/Palettes/`.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://scenegroup.gitbook.io/cavalry/user-interface/menus/window-menu/color-palette/palettes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
