Palettes
Intro
Palettes are stored as human readable .json
files that can be created either in-app via the Color Window or manually in a text editor.
Palettes can be used in the Swatches and Label tabs of the Color Window.
Format
An example palette (.pal
) file containing 4 color swatches:
{
"colors": [
{
"color": "#c8c8c8",
"swatchName": "Grey",
"uid": 0
},
{
"color": "#ffffff",
"swatchName": "White",
"uid": 1
},
{
"color": "#000000",
"swatchName": "Black",
"uid": 2
},
{
"color": "#4ffd7a",
"swatchName": "Green",
"types": [
"shader",
"filter"
],
"uid": 3
}
],
"designer": "Scene Group",
"fileType": ".pal",
"name": "Cavalry",
"version": 1.0,
"website": "https://cavalry.scenegroup.co/"
}
Keys
colors
(required) - An array of colors.color
(required) - Set a hex value for the color swatch.swatchName
(required) - Set a name for the color swatch. This is not currently used in the Library Palettes UI so can be left blank if preferred (e.g."swatchName": ""
) but is recommended for Label Palettes.uid
- The Id for the color swatch. This is used by the Label Palettes to reassign colors to Layer/Keyframes/Time Markers when switching palettes.types
- An array of superTypes that can be used to assign default Label Colors to Layers from the Label Palettes.
designer
- The author's name.fileType
- Specify the file extension.name
(recommended) - Give the palette a name. This will appear in the Library Palettes and Label Palettes drop down menus .version
- Set a version for compatibility in the future.website
- Add a URL for the designer.
Storing Palettes
Library 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.
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.
Library Palettes can also be saved as part of a Project when using Project Settings. By default, this directory is @project/Assets/Palettes/
.
Label Palettes
The default Label Palettes are stored as .pal
files in:
macOS - ~/Library/Application Support/Cavalry/LabelPalettes
Windows - C:\Users\USERNAME\AppData\Roaming\Cavalry\LabelPalettes