Docs
Color usage

Color usage

Colors system breakdown with best practices.

The shorthand utility classes below simplify our full color palette by providing sensible, contrast-checked defaults. Use them whenever possible to ensure accessible text colors and balanced background fills.

Text

Use accent text colors (e.g. text-destructive, text-warning) sparingly to avoid visual overload.

Postgrestext
Postgrestext-light
Postgrestext-lighter
Postgrestext-muted
Postgrestext-contrast
Postgrestext-destructive
Postgrestext-warning
Postgrestext-brand

Background

bg-200
bg
bg-alternative-200
bg-alternative
bg-selection
bg-control
bg-surface-75
bg-surface-100
bg-surface-200
bg-surface-300
bg-surface-400
bg-overlay
bg-overlay-hover
bg-muted
bg-button
bg-dialog
bg-dash-sidebar
bg-dash-canvas

App backgrounds

We use backgrounds in 2 different ways. In the ./www and ./docs sites, we use a darker background, so we have an extra background color we can use

/**
 * ./www background color
 * ./docs background color
 */
<body className="bg">{children}</body>
 
/**
 * ./studio background color
 */
<body className="bg-studio">{children}</body>

Backgrounds and Surfaces

./apps/www + ./apps/docs

We use surfaces in 2 different ways. In the ./www and ./docs sites, we use a darker background, so we have an extra surface color we can use

Loading...

./apps/studio

For the studio (dashboard) we can use bg-surface-100, bg-surface-200, bg-surface-300

Loading...

Data grid and frame space

Data grids use an alternative background color for empty space to add depth to the layout. The background of the empty space is the same background as used in ./apps/docs and ./apps/www - although; the color has been mapped to bg-alternative so it works well across different themes.

Loading...

Dealing with large areas of empty space in data display should also be catered for. You can use the bg-200 or bg class to fill the space.

Overlays

We use the ./bg-overlay background color for overlays. This is not to be confused with Dialogs, they require to use the same app background color as the site.

Border

border
border-muted
border-secondary
border-overlay
border-control
border-alternative
border-strong
border-stronger
border-button
border-button-hover

Other Colors

These can also be accessed with foreground. Like text-foreground-light.

bg-destructive-200
bg-destructive-300
bg-destructive-400
bg-destructive-500
bg-destructive-600
bg-destructive
bg-warning-200
bg-warning-300
bg-warning-400
bg-warning-500
bg-warning-600
bg-warning
bg-brand-200
bg-brand-300
bg-brand-400
bg-brand-500
bg-brand-600
bg-brand
bg-brand-link
bg-_secondary-200
bg-_secondary-400
bg-_secondary
bg-code_block-1
bg-code_block-2
bg-code_block-3
bg-code_block-4
bg-code_block-5