Get $50+ off for Black Friday!

Themes

Overview

You brand your app by choosing two things: a base gray and an accent color. Every other color, in light and dark mode, is derived from those.

Base gray

Jumpstart's styles use Tailwind's gray scale, and app/assets/tailwind/application.css points it at zinc. To use a different gray, point each shade at another palette, like slate, neutral or stone:

@theme {
  --color-gray-50: var(--color-slate-50);
  --color-gray-100: var(--color-slate-100);
  /* ...and so on, through 950 */
}

Accent color

The accent colors primary buttons, links, active tabs, focus rings and checked inputs. It's set by three variables in app/assets/tailwind/themes/theme.css, with their own values in dark mode:

  • --color-accent, the background of primary buttons
  • --color-accent-content, accent-colored text, like links
  • --color-accent-foreground, text on top of the accent

For a blue accent, for example:

:root,
.light {
  --color-accent: var(--color-blue-600);
  --color-accent-content: var(--color-blue-600);
  --color-accent-foreground: var(--color-white);
}

.dark {
  --color-accent: var(--color-blue-500);
  --color-accent-content: var(--color-blue-400);
  --color-accent-foreground: var(--color-white);
}

Use the accent in your own views with Tailwind utilities like bg-accent, text-accent-content and text-accent-foreground.

Status colors

Success, danger, warning and info stay green, red, yellow and blue whatever the accent is, since people read those colors as status rather than branding.

Examples

The same buttons with the default accent, and with blue and orange accents.

Link
Link
Link