Functional for shadcn/ui

Functional is a shadcn/ui theme built around a light violet primary color (#cdbdef) with muted light violet accents (#bfb6d3). The light mode uses a neutral background (#f9f7fd). Dark mode keeps the light violet primary (#cdbdef) on a neutral background (#040307).

Color palette

TokenLightDark
Background
#f9f7fdghostwhite
#040307black
Foreground
#080410black
#f9f8fbghostwhite
Card
#f6f2fcghostwhite
#07050bblack
Card foreground
#06030cblack
#fcfcfdwhite
Popover
#f6f2fcghostwhite
#07050bblack
Popover foreground
#06030cblack
#fcfcfdwhite
Primary
#cdbdefthistle
#cdbdefthistle
Primary foreground
#301863midnightblue
#301863midnightblue
Secondary
#d6d2e0gainsboro
#2d2c30darkslategray
Secondary foreground
#3c344bdarkslategray
#c6c4casilver
Muted
#dbd7e5gainsboro
#1e1a28black
Muted foreground
#656468dimgray
#98979bdarkgray
Accent
#bfb6d3silver
#3d3847darkslategray
Accent foreground
#272136darkslategray
#d7d4ddgainsboro
Destructive
#d7120ffirebrick
#f24340tomato
Destructive foreground
#ffffffwhite
#ffffffwhite
Border
#e5e7eblavender
#1f2937darkslategray
Input
#e5e7eblavender
#1f2937darkslategray
Ring
#cdbdefthistle
#cdbdefthistle

Contrast

WCAG 2 contrast ratios between each background and its foreground color.

Light mode
Text on background19.02:1AAA
Text on card18.57:1AAA
Primary button8.45:1AAA
Secondary button7.92:1AAA
Muted text4.14:1AA Large
Accent7.97:1AAA
Destructive5.28:1AA
Dark mode
Text on background19.42:1AAA
Text on card19.82:1AAA
Primary button8.45:1AAA
Secondary button8.05:1AAA
Muted text5.86:1AA
Accent7.72:1AAA
Destructive3.71:1AA Large

CSS variables

Paste this into your globals.css to use Functional in your shadcn/ui project.

:root {
  --radius: 0.5rem;
  --background: oklch(0.978 0.009 300.616);
  --foreground: oklch(0.125 0.03 299.695);
  --muted: oklch(0.886 0.02 300.389);
  --muted-foreground: oklch(0.506 0.007 300.554);
  --popover: oklch(0.968 0.014 300.536);
  --popover-foreground: oklch(0.113 0.026 300.943);
  --card: oklch(0.968 0.014 300.536);
  --card-foreground: oklch(0.113 0.026 300.943);
  --border: oklch(0.928 0.006 264.531);
  --input: oklch(0.928 0.006 264.531);
  --primary: oklch(0.829 0.071 299.346);
  --primary-foreground: oklch(0.292 0.123 291.357);
  --secondary: oklch(0.871 0.019 300.402);
  --secondary-foreground: oklch(0.344 0.041 298.78);
  --accent: oklch(0.792 0.042 299.888);
  --accent-foreground: oklch(0.264 0.041 298.126);
  --destructive: oklch(0.556 0.221 28.892);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.829 0.071 299.346);
  --chart-1: oklch(0.829 0.071 299.346);
  --chart-2: oklch(0.871 0.019 300.402);
  --chart-3: oklch(0.792 0.042 299.888);
  --chart-4: oklch(0.897 0.015 300.486);
  --chart-5: oklch(0.827 0.074 299.269);
}

.dark {
  --radius: 0.5rem;
  --background: oklch(0.105 0.015 301.017);
  --foreground: oklch(0.982 0.004 300.698);
  --muted: oklch(0.23 0.028 298.672);
  --muted-foreground: oklch(0.679 0.006 300.62);
  --popover: oklch(0.12 0.017 300.988);
  --popover-foreground: oklch(0.991 0.002 300.733);
  --card: oklch(0.12 0.017 300.988);
  --card-foreground: oklch(0.991 0.002 300.733);
  --border: oklch(0.278 0.03 256.848);
  --input: oklch(0.278 0.03 256.848);
  --primary: oklch(0.829 0.071 299.346);
  --primary-foreground: oklch(0.292 0.123 291.357);
  --secondary: oklch(0.295 0.008 300.296);
  --secondary-foreground: oklch(0.824 0.008 300.608);
  --accent: oklch(0.352 0.027 299.497);
  --accent-foreground: oklch(0.875 0.013 300.526);
  --destructive: oklch(0.64 0.212 26.277);
  --destructive-foreground: oklch(1 0 180);
  --ring: oklch(0.829 0.071 299.346);
  --chart-1: oklch(0.829 0.071 299.346);
  --chart-2: oklch(0.295 0.008 300.296);
  --chart-3: oklch(0.352 0.027 299.497);
  --chart-4: oklch(0.324 0.01 300.279);
  --chart-5: oklch(0.827 0.074 299.269);
}