<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5HGSQD2L" height="0" width="0" style="display:none;visibility:hidden" title="GTM"></iframe>

Color

Color is a crucial aspect of our visual language, conveying meaning, emphasis, and hierarchy in our product UI. Built on the Vista brand guidelines, our colors enhance our customers' experience by clearly differentiating elements, guiding interactions, and maintaining visual coherence throughout Vista products.

Color decisions are stored in tokens which sync between code and Figma. All color-related design tokens start with the word color, followed by a property: bg, border, icon, or text. The full list of color tokens can be seen on the All Tokens page.

Palettes

SWAN’s color system is composed of eight palettes for different UI needs.

A neutral color palette is commonly used for text, icons, backgrounds, borders, and interactive states.

Neutral palettes

Two opacity palettes align to the grey palette, used on backgrounds and elevations allowing them to blend into the surface below.

Opacity palettes

Five saturated color palettes are used for semantic roles, such as error and warning. See "Roles" below.

Saturated palettes

Roles

The saturated palettes are used as a basis for semantic roles within SWAN. These roles (and their colors) provide consistency around feedback for positive or negative actions for users. Ensure you are using matching your use case to the specific semantic role—do not use a role just to achieve a particular color.

ROLE

DESCRIPTION

Info

To signify neutral information

Success

To signify a positive outcome, e.g. user data successfully submitted

Warning

To signify caution of a possible action

Error

To signify a negative outcome, e.g. user data cannot be submitted

Accent

To signify a standout area or a brand moment

Promo

To signify promotional content, e.g. discounts

Help

To signify content relating to user help, e.g. CARE

The preview has been updated.

Pairing roles

Role-related colors are made to work together. This means that any role-related text color (e.g. sem.color.text.success) will work on its equivalent background color (e.g. sem.color.bg.success). The text color sem.color.text.success-alt can also be used with the success role background color to achieve desaturated text. However, most role colors don't necessarily have to be used together.

The preview has been updated.

Role colors with "paired" in their name however must be used together. This is because they require specific color pairings to meet accessibility contrast requirements in both Standard and Dark modes. For example, sem.color.text.help-strong-paired and sem.color.bg.help-strong-paired must always be used together.

Interaction

Colors often have sets of related values (with related tokens) to support different interaction states such as hover and active. When applicable, these will build on existing emphasis levels; for example, sem.color.bg.strong.hover is the hover state version of the "strong" background color.

Selected color tokens such as sem.color.border.selected and sem.color.bg.selected-accent tokens also have interaction states.

Focus is signified through through borders, and thus doesn't have corresponding tokens like hover. If required, sem.focus tokens can be used.

Dark mode

Dark mode reverses the colors of a section of your page, enabling text and components to be legible on darker backgrounds.

For more information on modes, see Modes.

Brand colors

Warm White and Midnight are two of our new brand colors, and we are looking to integrate it on our site to help create an ownable brand aesthetic.

  • Infuse Warm White on “text-only” areas to create a soft contrast with white backgrounds. Using it as the background for FAQs background will make these sections more consistently recognizable.
  • Warm White can also be used as a marketing banner background.
  • Infuse Midnight on the site footer to make it branded and ownable.

Seasonal palettes

This is planned for release after the visual language refresh has gone live in SWAN v3.3. More information coming soon!

Props

Text

The textColor prop is a core prop that can be used to change the color of text. (In the vanilla API, this is the CSS class swan-text-color-[color] instead, e.g. swan-text-color-error.)

Ensure that text and background meets a 4.5:1 color contrast ratio.

The preview has been updated.

Background

The backgroundColor (or bgc) prop is a core prop that can be used to change the color of the background. (In the vanilla API, this is the CSS class swan-bgc-[color] instead, e.g. swan-bgc-error.)

Ensure that text and background meets a 4.5:1 color contrast ratio. The BACKGROUND_WITH_MODE object can be used to dynamically set Dark mode to ensure the correct contrast.

The preview has been updated.

For marketing-specific background colors, the MARKETING_COLORS object offers a set of approved marketing-only background colors for use in Contentful/Builder. These can be used with whitelisted SWAN components (such as Banner) through the --swan-public-marketing-background CSS Custom Property.

Was this page useful?

Thanks for your feedback!

Feel free to include your name if you wish to have a follow up conversation.


Published: Jun 30, 2022Last updated: Oct 17, 2024