# Colors

> Explore Cimpress UI's color tokens.

Source: https://ui.cimpress.io/foundations/colors/

Colors are defined in the Figma library and exposed through CSS variables. All CSS variables are prefixed with `cim`, so for example `fg-base` becomes `--cim-fg-base`. These variables can be used directly in your CSS:

```css "var(--cim-fg-base)"
.title {
  color: var(--cim-fg-base);
}
```

Or through components like [`Text`](/components/text), which exposes all foreground colors via the `tone` prop (without the `fg-` prefix, so `fg-base` becomes `base`):

```tsx "tone="base""
<Text variant="title-1" as="h1" tone="base">
  Some text
</Text>
```

See our Colors guide in Figma for a more thorough deep dive.

## Foreground

Used for text and icons.

| Token                | CSS variable               | Description                                                                         |
| -------------------- | -------------------------- | ----------------------------------------------------------------------------------- |
| `fg-base`            | `--cim-fg-base`            | Used as the default text color for body content and headings                        |
| `fg-subtle`          | `--cim-fg-subtle`          | Used for secondary and less prominent text                                          |
| `fg-muted`           | `--cim-fg-muted`           | Used for disabled and tertiary text                                                 |
| `fg-inverse`         | `--cim-fg-inverse`         | Used for text that appears on dark backgrounds                                      |
| `fg-accent`          | `--cim-fg-accent`          | Used for important actions, interactive elements, or key information                |
| `fg-accent-hover`    | `--cim-fg-accent-hover`    | Used for the hover state of interactive elements                                    |
| `fg-accent-active`   | `--cim-fg-accent-active`   | Used for the active state when interactive elements are pressed                     |
| `fg-info`            | `--cim-fg-info`            | Used for the informational state for actions and text                               |
| `fg-success`         | `--cim-fg-success`         | Used for the success state for actions and text                                     |
| `fg-warning`         | `--cim-fg-warning`         | Used for the warning state for actions and text                                     |
| `fg-critical`        | `--cim-fg-critical`        | Used for critical interactive elements and for the error state for actions and text |
| `fg-critical-hover`  | `--cim-fg-critical-hover`  | Used for the hover state for critical interactive elements                          |
| `fg-critical-active` | `--cim-fg-critical-active` | Used for the active state for critical interactive elements                         |

## Border

Used for borders and dividers.

| Token                 | CSS variable                | Description                                                  |
| --------------------- | --------------------------- | ------------------------------------------------------------ |
| `border-base`         | `--cim-border-base`         | Used as the default border color                             |
| `border-subtle`       | `--cim-border-subtle`       | Used for lighter borders for subtle separation               |
| `border-hover`        | `--cim-border-hover`        | Used for the hover state for borders                         |
| `border-accent`       | `--cim-border-accent`       | Used to highlight active or selected elements                |
| `border-accent-hover` | `--cim-border-accent-hover` | Used for the hover state for borders of interactive elements |
| `border-info`         | `--cim-border-info`         | Used for the border of informational elements                |
| `border-success`      | `--cim-border-success`      | Used for the border of success elements                      |
| `border-warning`      | `--cim-border-warning`      | Used for the border of warning elements                      |
| `border-critical`     | `--cim-border-critical`     | Used for the border of critical and error elements           |
| `border-focus`        | `--cim-border-focus`        | Used for focus state borders                                 |

## Backgrounds

Used for surfaces and backgrounds.

| Token                       | CSS variable                      | Description                                                                                |
| --------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------ |
| `bg-base`                   | `--cim-bg-base`                   | Used as the default background color                                                       |
| `bg-subtle`                 | `--cim-bg-subtle`                 | Used as a subtle background for read-only and secondary surfaces                           |
| `bg-muted`                  | `--cim-bg-muted`                  | Used as a muted background for disabled and tertiary surfaces                              |
| `bg-accent`                 | `--cim-bg-accent`                 | Used as the background for interactive elements                                            |
| `bg-accent-hover`           | `--cim-bg-accent-hover`           | Used as the background for hover states for interactive elements                           |
| `bg-accent-active`          | `--cim-bg-accent-active`          | Used as the background for active states when interactive elements are pressed             |
| `bg-accent-subtle`          | `--cim-bg-accent-subtle`          | Used for highlighted or selected elements                                                  |
| `bg-accent-subtle-hover`    | `--cim-bg-accent-subtle-hover`    | Used as the background for hover states for highlighted or selected elements               |
| `bg-accent-subtle-active`   | `--cim-bg-accent-subtle-active`   | Used as the background for active states when highlighted or selected elements are pressed |
| `bg-info`                   | `--cim-bg-info`                   | Used as the background for informational elements                                          |
| `bg-info-subtle`            | `--cim-bg-info-subtle`            | Used as the background for informational elements                                          |
| `bg-success`                | `--cim-bg-success`                | Used as the background for success elements                                                |
| `bg-success-subtle`         | `--cim-bg-success-subtle`         | Used as the background for success elements                                                |
| `bg-warning`                | `--cim-bg-warning`                | Used as the background for warning elements                                                |
| `bg-warning-subtle`         | `--cim-bg-warning-subtle`         | Used as the background for warning elements                                                |
| `bg-critical`               | `--cim-bg-critical`               | Used as the background for critical or error elements                                      |
| `bg-critical-hover`         | `--cim-bg-critical-hover`         | Used as the background for hover states for critical elements                              |
| `bg-critical-active`        | `--cim-bg-critical-active`        | Used as the background for active states when critical elements are pressed                |
| `bg-critical-subtle`        | `--cim-bg-critical-subtle`        | Used as the background for critical or error elements                                      |
| `bg-critical-subtle-hover`  | `--cim-bg-critical-subtle-hover`  | Used as the background for hover states for critical elements                              |
| `bg-critical-subtle-active` | `--cim-bg-critical-subtle-active` | Used as the background for active states when critical elements are pressed                |
