Glass is a shadcn/ui theme built around a muted orange primary color (#a89f99) with muted light orange accents (#d4cdc9). The light mode uses a neutral background (#ffffff). Dark mode keeps the muted orange primary (#a89f99) on an orange-tinted background (#100904).
| Token | Light | Dark |
|---|---|---|
| Background | #ffffffwhite | #100904black |
| Foreground | #150b04black | #faf7f4whitesmoke |
| Card | #ffffffwhite | #100904black |
| Card foreground | #150b04black | #faf7f4whitesmoke |
| Popover | #ffffffwhite | #100904black |
| Popover foreground | #150b04black | #faf7f4whitesmoke |
| Primary | #a89f99darkgray | #a89f99darkgray |
| Primary foreground | #080707black | #080707black |
| Secondary | #e9e8e7linen | #352c27darkslategray |
| Secondary foreground | #534e4bdarkslategray | #cfc5besilver |
| Muted | #dddbd9gainsboro | #262322black |
| Muted foreground | #725f55dimgray | #aa988drosybrown |
| Accent | #d4cdc9lightgrey | #4a3a30darkslategray |
| Accent foreground | #3c342fdarkslategray | #dfd4celightgrey |
| Destructive | #722d09saddlebrown | #f17f41coral |
| Destructive foreground | #f9ccb3peachpuff | #000000black |
| Border | #e5e7eblavender | #1f2937darkslategray |
| Input | #e5e7eblavender | #1f2937darkslategray |
| Ring | #a89f99darkgray | #a89f99darkgray |
WCAG 2 contrast ratios between each background and its foreground color.
| Text on background | 19.41:1 | AAA |
| Text on card | 19.41:1 | AAA |
| Primary button | 7.72:1 | AAA |
| Secondary button | 6.69:1 | AA |
| Muted text | 4.36:1 | AA Large |
| Accent | 7.76:1 | AAA |
| Destructive | 6.82:1 | AA |
| Text on background | 18.53:1 | AAA |
| Text on card | 18.53:1 | AAA |
| Primary button | 7.72:1 | AAA |
| Secondary button | 8.03:1 | AAA |
| Muted text | 5.63:1 | AA |
| Accent | 7.46:1 | AAA |
| Destructive | 7.82:1 | AAA |
Paste this into your globals.css to use Glass in your shadcn/ui project.
:root {
--radius: 0.5rem;
--background: oklch(1 0 180);
--foreground: oklch(0.16 0.024 55.517);
--muted: oklch(0.892 0.004 52.524);
--muted-foreground: oklch(0.502 0.03 51.822);
--popover: oklch(1 0 180);
--popover-foreground: oklch(0.16 0.024 55.517);
--card: oklch(1 0 180);
--card-foreground: oklch(0.16 0.024 55.517);
--border: oklch(0.928 0.006 264.531);
--input: oklch(0.928 0.006 264.531);
--primary: oklch(0.708 0.014 52.322);
--primary-foreground: oklch(0.132 0.002 53.643);
--secondary: oklch(0.931 0.002 52.551);
--secondary-foreground: oklch(0.428 0.008 52.326);
--accent: oklch(0.853 0.01 52.421);
--accent-foreground: oklch(0.331 0.014 52.026);
--destructive: oklch(0.391 0.107 43.905);
--destructive-foreground: oklch(0.878 0.062 49.832);
--ring: oklch(0.708 0.014 52.322);
--chart-1: oklch(0.708 0.014 52.322);
--chart-2: oklch(0.931 0.002 52.551);
--chart-3: oklch(0.853 0.01 52.421);
--chart-4: oklch(0.954 0.001 52.561);
--chart-5: oklch(0.708 0.019 52.228);
}
.dark {
--radius: 0.5rem;
--background: oklch(0.147 0.018 58.043);
--foreground: oklch(0.977 0.005 52.508);
--muted: oklch(0.259 0.005 52.322);
--muted-foreground: oklch(0.692 0.028 52.066);
--popover: oklch(0.147 0.018 58.043);
--popover-foreground: oklch(0.977 0.005 52.508);
--card: oklch(0.147 0.018 58.043);
--card-foreground: oklch(0.977 0.005 52.508);
--border: oklch(0.278 0.03 256.848);
--input: oklch(0.278 0.03 256.848);
--primary: oklch(0.708 0.014 52.322);
--primary-foreground: oklch(0.132 0.002 53.643);
--secondary: oklch(0.301 0.016 51.915);
--secondary-foreground: oklch(0.829 0.015 52.343);
--accent: oklch(0.362 0.028 51.596);
--accent-foreground: oklch(0.877 0.015 52.355);
--destructive: oklch(0.714 0.159 46.75);
--destructive-foreground: oklch(0 0 0);
--ring: oklch(0.708 0.014 52.322);
--chart-1: oklch(0.708 0.014 52.322);
--chart-2: oklch(0.301 0.016 51.915);
--chart-3: oklch(0.362 0.028 51.596);
--chart-4: oklch(0.332 0.018 51.893);
--chart-5: oklch(0.708 0.019 52.228);
}