Stretch keeps every colour in a CSS variable. You can change any of them with a few lines of CSS in Ghost Admin. You do not edit the theme files, so your colours stay when you update Stretch.

Try the settings first

Some colours have a setting. Use the setting when there is one:

  • Colour scheme: Light, Dark, System, Pastel or Bold.
  • Accent colour: buttons, highlights and the hero background.
  • Background colour: the frame around the site card.

See Colours and fonts. Use custom CSS for the colours that have no setting, for example the text or the cards.

Add your CSS

  1. In Ghost Admin, go to Settings → Code injection.
  2. Open Site header.
  3. Paste your CSS inside a <style> tag, like the example below.
  4. Click Save.
  5. Open your site and reload the page.
<style>
/* Light scheme */
:root {
    --color-accent: #2f7d4f;
    --color-text: #1d3b2a;
    --color-surface: #fbf8f1;
    --color-canvas: #e7e1d3;
}

/* Dark scheme */
:root[data-theme="Dark"] {
    --color-surface: #1b2b22;
    --color-canvas: #0f1a14;
}
</style>

Which scheme your CSS changes

Each colour scheme has its own colours. Your CSS changes only the scheme you name:

SelectorChanges
:rootLight, and System on a light device
:root[data-theme="Dark"]Dark, and System on a dark device
:root[data-theme="Pastel"]Pastel
:root[data-theme="Bold"]Bold

The accent is different. --color-accent in :root changes the accent in Light, Dark and System. Pastel and Bold keep their own accent, unless you set it in their own block.

If you use System, give colours for both Light and Dark. Then the site looks right on every device.

How the accent colour works

  • The accent you pick in Design & branding → Brand applies to Light, Dark and System.
  • Ghost's default accent is pink (#FF1A75). If you do not change it, Stretch treats it as "not picked". Light then uses brown (#92400e) and Dark uses amber (#fbbf24).
  • To change these defaults, set --color-accent-default in :root or in :root[data-theme="Dark"].
  • To use Ghost's pink after all, set it with CSS: :root { --color-accent: #ff1a75; }.
  • Pastel and Bold do not use the Brand accent. They have a fixed palette.
  • Text on the accent is black or white. Stretch picks the one that is easier to read, also when you set the accent with CSS.

Colour variables

These are the variables you will change most. The full list is at the top of assets/css/tokens.css in the theme zip.

Accent

VariableWhat it colours
--color-accentPrimary buttons, the focus ring, highlights and the hero background when there is no cover image. Card backgrounds and borders mix in a little of it.
--color-accent-defaultThe accent of a scheme when no accent is picked in Ghost Admin.

Text

VariableWhat it colours
--color-textAll body text and headings. Links use it too.
--color-text-inverseText on dark areas in light schemes, and the other way round.
--color-text-on-imageText over cover photos. It stays light in every scheme.
--color-text-on-canvasFooter text, which sits on the frame outside the site card.
--color-errorError messages in the sign-up form.

Backgrounds

VariableWhat it colours
--color-canvasThe frame around the site card. The Background colour setting also sets it.
--color-surfaceThe site card and the post cards.
--color-surface-mutedInline code, table headers and empty avatar circles.
--color-surface-accentThe author card, the featured post, the paywall box and related posts. By default it is a light tint of the accent.
--color-surface-inverseThe hero behind cover photos, and the subscribe band.
--color-overlayThe shade over cover photos. The Hero overlay setting controls how strong it is.
VariableWhat it colours
--color-border-defaultThin lines in post content, tables and cards.
--color-border-accentPost card borders and the share card. By default it is a tint of the accent.
--color-border-strongOutlined buttons and form fields.
--color-link, --color-link-hoverLinks in post content.
--color-canvas-linkFooter links on hover.
--color-focus-ringThe outline that shows which link or button has keyboard focus.
--color-button-primary-backgroundPrimary buttons. By default it is the accent.
--color-button-primary-textText on primary buttons. Stretch sets it from the accent, so change it only if you also change the button background.
--color-mark-backgroundHighlighted text in posts.
--color-code-background, --color-code-textCode blocks.

Tips

  • Change a few variables at a time, then check the home page, a post and a tag page.
  • Keep text readable. Text and its background need a contrast of at least 4.5:1. Free tools such as the WebAIM contrast checker show the number.
  • A colour like --color-surface-accent is mixed from the accent. If you set it yourself, it stops following the accent.
  • To undo everything, delete your CSS from Code injection and click Save.

Discover Ghost newsletter

Ghost tips and new themes, in your inbox.

New tutorials, platform updates, and theme releases. Sent only when there is something worth reading.

Thanks for subscribing. Check your inbox to confirm.