> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/portals/building-a-portal/style/colors.md).

# Colors

Set the theme and the three colours every section draws from.

Find it under **Style** → **Colors** in the builder sidebar. Four settings, and every section in the Portal takes its colour from them — there is no per-section palette to keep in step.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2FpMyTCiTOeL3HDAGD3h3u%2Fimage.png?alt=media&#x26;token=b4e58e48-bfab-4a64-892c-7da707466a30" alt="" width="298"><figcaption><p>The <strong>Colors</strong> group in the builder's Style sidebar.</p></figcaption></figure>

| Setting        | What it decides                                              |
| -------------- | ------------------------------------------------------------ |
| **Theme**      | Whether the Portal is light or dark.                         |
| **Primary**    | Your main brand colour.                                      |
| **Accent**     | The colour of things visitors click.                         |
| **Background** | How strongly the page background is tinted with **Primary**. |

## Theme

**Light** or **Dark**. The choice is absolute — a Portal set to dark is dark for everyone, and does not follow the visitor's own system setting.

It changes more than the background: text, borders and surfaces all switch to the matching set, and your **Primary** and **Accent** colours are re-tinted so they stay legible against it. Pick the theme before you spend time on the colours, not after.

### Flipping a single section

The theme is the Portal's baseline, not a rule every section has to obey. Any section can be turned against it with **Invert colors** on its toolbar: on a light Portal that one section goes dark, and on a dark Portal it goes light.

<figure><img src="https://2536208400-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqsq2dR7Fjagf5eTifWZx%2Fuploads%2F4yHjmu21wkF8o2Ih0RpN%2Fimage.png?alt=media&#x26;token=a6fcb08a-967c-4e7f-bc2e-b874b417af19" alt="" width="191"><figcaption><p>Turning one section against the Portal's theme with <strong>Invert colors</strong>.</p></figcaption></figure>

It's a flip, not a second theme — there's no separate palette to set. The section keeps your **Primary** and **Accent** colours and simply renders them on the opposite ground, so the page stays coherent.

Use it to break up a long page: a dark call to action between light sections, a dark footer band, a hero set apart from the content under it. Used sparingly it gives a page rhythm; used on every other section it just looks striped.

See [Working with sections](https://docs.scaleflex.com/portals/building-a-portal/sections/working-with-sections.md) for the toolbar it sits on.

{% hint style="info" %}
Because the flip is relative to the theme, switching the Portal from light to dark also switches every inverted section the other way — the contrast you arranged is preserved rather than lost.
{% endhint %}

## Primary

Your main brand colour — used for section backgrounds, tiles and bands. The page background tone is tinted from it.

This is the colour a visitor reads as "the brand": large areas rather than small details. Because the background tone is derived from it, changing **Primary** shifts the whole page, not just the blocks that use it directly.

## Accent

Used for interactive elements — buttons, links, badges and focus rings. Set it apart from **Primary** when the chrome should stay quiet.

The practical test: could a visitor scan the page and tell what's clickable? If **Accent** is close to **Primary**, the answer is usually no. Galleries and brand portals in particular tend to want a muted primary with one distinctly different accent.

## Background

How much of **Primary** washes into the page behind everything.

| Tone       | Result                                         |
| ---------- | ---------------------------------------------- |
| **Base**   | No tint — plain white, or plain black in dark. |
| **Pastel** | The faintest wash of your primary colour.      |
| **Light**  | A little more.                                 |
| **Soft**   | The strongest of the tints.                    |
| **Custom** | Any colour you choose, ignoring **Primary**.   |

Choosing **Custom** opens a colour picker under the dropdown. Everything else keeps the page in the same family as your brand automatically, which is usually what you want — reach for **Custom** only when a specific value is mandated.

{% hint style="info" %}
Switching **Theme** while **Background** is set to **Custom** resets that custom colour to plain white or plain black, since a tint picked for a light page rarely works on a dark one. Set the theme first, then the custom colour.
{% endhint %}

## Choosing a colour

**Primary** and **Accent** each open the same picker: a swatch to click, a set of presets, and a hex field if you're matching an exact brand value. Type or paste the hex when you have one — it's faster than hunting for it on the wheel, and exact.

## Starting from a theme instead

If you'd rather not choose colours from scratch, **Browse preset themes** at the bottom of the panel sets colours, typography and shape together — see **Style**.
