> For the complete documentation index, see [llms.txt](https://ezedits.gitbook.io/ezedits/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ezedits.gitbook.io/ezedits/palettes/palettes-explained.md).

# Palettes Explained

Palettes in ezEdits represent a list of blocks that can be used in several commands where the order of blocks will be maintained.

Palettes can be saved and accessed using the **`#`** prefix for user-saved palettes, and **`##`** for [inbuilt preset palettes](/ezedits/palettes/default-palettes.md).

For reference, here's an example:

<figure><img src="/files/gst9LPoEaEllocnpW5je" alt=""><figcaption><p>##Grayscale</p></figcaption></figure>

Some of the many features that use palettes include:

* `//eztexture ...` - [Texturing Commands](/ezedits/commands/texturing.md)
* `#palette` - [Palette mask](/ezedits/masks-and-patterns/masks.md#palette-mask)
* `//ezbrush gradient ...` - [Brushes](/ezedits/brushes-and-tools/brushes.md)

Palettes can be constructed as a simple list of blocks, or via several modifiers:

* **`,`** - <mark style="color:orange;">**Concatenate**</mark>:
  * Adds one block or palette to the end of the preceding block or palette.\
    e.g `stone,dirt` is a 2 block palette of stone and dirt. `stone,##Grayscale` is a palette made of stone and the blocks of the ##Grayscale preset palette.
* **`-`** - <mark style="color:orange;">**Invert**</mark>:
  * Reverses the order of a palette.\
    e.g `-##Grayscale` is the ##Grayscale preset palette in reverse order (starts with white instead of black)
* **`(start:end)`** - <mark style="color:orange;">**Sub-palette**</mark>:
  * Returns a portion of a palette.\
    e.g `##Grayscale(1:8)` will return the first 8 blocks of the ##Grayscale preset palette.
* **`*`** - <mark style="color:orange;">**Repeater**</mark>:
  * Repeats the previous segment a given number of times.\
    e.g `gold_block*10,diamond_block` will return a palette of 10 gold blocks, followed by a single diamond block.
* **`[]`** - <mark style="color:orange;">**Grouping**</mark>:
  * Groups palettes together to allow a modifier to treat them as a single palette.\
    e.g `-##Grayscale,gold_block` will return the ##Grayscale preset palette in reverse order, with a gold block at the end. Where `-[##Grayscale,gold_block]` will return the gold block at the start.
* **`=`** - <mark style="color:orange;">**Result**</mark>:
  * Allows a palette to be tab-completed into its list of blocks if needed.

### Video Tutorial

[MegRae](https://megrae.art/) also made a tutorial for palettes:

{% embed url="<https://youtu.be/VGsTle3g9AU>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://ezedits.gitbook.io/ezedits/palettes/palettes-explained.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
