> For the complete documentation index, see [llms.txt](https://docs.webgeoda.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.webgeoda.org/variables/colors.md).

# Colors

Map color scales strongly impact the interpretation of a map and impact its accessibility, legibility, and visual interest. WebGeoDa provides a collection of helpful built-in color scaling standards, and also allows for any custom color scale to be added.

## Color Format

All color scales should be arrays of RGB values, like so:

```javascript
const myColorScale = [
    [0,0,0], //r, g, b
    [40,40,40],
    [80,80,80],
    [140,140,140],
    [220,220,220]
]
```

## ColorBrewer

ColorBrewer scales, designed by the immeasurable Cynthia Brewer, are available for convenient use in WebGeoDa. Preview these scales below:

{% embed url="<https://colorbrewer2.org/#type=sequential&scheme=BuGn&n=3>" %}

When using ColorBrewer scales, you can specify a given scale as shown below:

```javascript
const variables = [{
    variable: 'myVar',
    numerator: 'myData',
    nProperty: 'myColumn',
    binning: 'naturalBreaks',
    colorScale: colors.colorBrewer.Reds
}]
```

## GeoDa Spatial Statistics

The official GeoDa color scales are available under `colors.geoda` and include color scales for LISA data and hinge breaks.


---

# 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.webgeoda.org/variables/colors.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.
