> For the complete documentation index, see [llms.txt](https://docs.kumu.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kumu.io/guides/controls/color-legend-control.md).

# Color-legend control

**When do you use it?**

Add a color legend to your map.

## **Advanced Editor**

Build a color-legend manually:

```scss
@controls {
  bottom-left {
    color-legend {
      color {
        value: red;
        label: "All the red things";
      }

      color {
        value: blue;
        label: "All the blue things";
      }
    }
  }
}
```

Automatically build the `color-legend` from the `element-color` value in `@settings`:

```scss
@controls {
  bottom-left {
    color-legend {
      colors: auto;
    }
  }
}

@settings {
  element-color: categorize("Element type", set2);
}
```

**Supported properties**

* `colors` defaults to `auto` and tries to build the list of colors and labels

[Check out our controls reference](/overview/advanced-editor-hub/controls-reference.md) to see the full list of properties and values recognized by the color legend control.

The `color-legend` can be customized using nested `color` blocks which support the following properties:

* `value` the color itself ("red" or "#BA462F")
* `label` the text to put next to the color


---

# 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:

```
GET https://docs.kumu.io/guides/controls/color-legend-control.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.
