Colors

Design tokens for colors

Colors

Vibrant UI provides a comprehensive color system with semantic colors and neutral palettes.

Color Palettes

Primary Colors

blue
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.blue['500']
indigo
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.indigo['500']
violet
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.violet['500']
purple
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.purple['500']
fuchsia
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.fuchsia['500']
pink
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.pink['500']
red
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.red['500']
orange
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.orange['500']
amber
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.amber['500']
yellow
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.yellow['500']
lime
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.lime['500']
green
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.green['500']
teal
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.teal['500']
cyan
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.colors.cyan['500']

Neutral Palettes

slate
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.neutrals.slate['500']
gray
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.neutrals.gray['500']
stone
50
100
200
300
400
500
600
700
800
900
950
Usage: tokens.neutrals.stone['500']

Semantic Colors

The theme system provides semantic color mappings:

  • Primary: Default brand color (blue)
  • Accent: Secondary brand color (green)
  • Info: Informational messages (blue)
  • Positive: Success states (green)
  • Notice: Warning states (orange)
  • Negative: Error states (red)

Usage

In JavaScript/TypeScript

import { tokens } from '@vibrant-ui/tokens';

// Access color values
const primaryBlue = tokens.colors.blue[500]; // "22 125 253"
const neutralGray = tokens.neutrals.gray[100]; // "231 238 244"

// Use in CSS-in-JS
const styles = {
  backgroundColor: `rgb(${tokens.colors.blue[500]})`,
  color: `rgb(${tokens.neutrals.gray[50]})`,
};

In CSS

.my-element {
  background-color: rgb(var(--token-colors-blue-500));
  color: rgb(var(--token-neutrals-gray-50));
}

With Vibrant UI Components

import { Button } from '@vibrant-ui/components';

<Button color="blue" variant="solid">
  Primary Action
</Button>;

Color Values

All colors are provided in RGB format without the rgb() wrapper, making them compatible with modern CSS features like opacity modifiers:

/* Using opacity modifier */
background-color: rgb(var(--token-colors-blue-500) / 0.5);

/* Traditional approach */
background-color: rgba(22, 125, 253, 0.5);
Edit on GitHub

Last updated on