Basker Docs

Color schemes

Create and edit the color palettes that blocks use, and set the default palette for the site.

A color scheme is a named set of colors for backgrounds, text, and accents. Each block can use one scheme. A block with no scheme uses the default scheme of the theme.

The Color Schemes screen with the Default scheme selected. The preview shows the scheme on a sample section and lists contrast checks. The settings show the Base and Brand colors.

The Color Schemes screen with the default scheme open.

  1. 1Base — The background colors and the text color on them.
  2. 2Default — Marks the default color scheme of the theme.
  3. 3Brand — The brand colors and the text colors on them.
  4. 4primary-content on primary — A contrast check between a text color and its background color.
  5. 5Save — Saves the scheme.

Create a color scheme

Open Color Schemes

Open Design → Color Schemes.

Click New

Click New. A Preset picker shows these starting points:

  • Light: white base with a blue primary.
  • Dark: dark base with light text.
  • Warm: cream base with terracotta.
  • Mono: black and white only.

The picker also has a blank starting point that uses the default values.

Name the scheme

Enter a name that tells editors when to use the scheme, for example Dark or Brand accent. Each name can be used one time in a theme.

Set the colors

Click a color to change it. The preview shows the scheme on a sample section.

Save

Click Save.

The colors in a scheme

A scheme has 20 colors in three groups. The screen shows each color by its name.

GroupColorsUse
Basebase-100, base-200, base-300, base-contentThe page background, two more surface colors, and the text on them.
Brandprimary, secondary, accent, neutral, each with a -content colorThe brand colors, and the text that shows on each of them.
Statusinfo, success, warning, error, each with a -content colorThe colors of messages, and the text that shows on each of them.

A -content color is the color of text on the color with the same name. For example, primary-content is the text color on primary.

Check the contrast

The preview lists each pair of text color and background color with its contrast ratio and a grade:

  • AAA: 7:1 or more.
  • AA: 4.5:1 or more.
  • AA large: 3:1 or more. This contrast is sufficient only for large text.
  • Fail: less than 3:1.

When a pair is below 4.5:1, a Low contrast message shows above the colors. Click Fix contrast to set each text color to white or near-black, the one that is easier to read on its background.

Set the default color scheme

  1. Open the scheme.
  2. Open the More actions menu.
  3. Click Make default colour scheme.
  4. Open Design → Themes and deploy the theme.

Basker saves the default to the draft of the theme. The default changes on the live site when you deploy the theme. A Default badge marks the default scheme in the list.

A change to the default scheme changes many blocks

Each block with no scheme of its own uses the default scheme. To change one block, choose a different scheme on that block.

Delete a color scheme

Open the scheme, open the More actions menu, and click Delete. You cannot delete the default scheme or the last scheme. Set a different scheme as the default first.

Where to go next

On this page