shadcn token

shadcn Primary Blue in OKLCH

Quick answer: shadcn Primary Blue is #3B82F6, which converts to oklch(0.623 0.188 259.80). On white, it has a WCAG contrast ratio of 3.67:1 and an APCA score of Lc +63.89.

This meets the WCAG 2.2 AA Large text threshold (3:1) on white. The OKLCH base colors used here are available in shadcn/ui since the Tailwind v4 update (February 2025), with 92% global browser support for OKLCH notation (caniuse, April 2026).

oklch(0.623 0.188 259.80)

shadcn Primary Blue is a shadcn theme token. This page frames #3B82F6 as a theme token: paste the :root and .dark blocks below to theme every component at once.

Also see

#3B82F6 is documented from more than one angle. This page frames it as a shadcn theme token. The same hex is also covered here:

  • Specs

    oklch(0.623 0.188 259.80)
    #3B82F6

    Highest contrast: black

    5.70:1
    Normal AAmeets WCAG 2.2
    Normal AAAdoes not meet WCAG 2.2
    Large AAmeets WCAG 2.2
    Large AAAmeets WCAG 2.2
    Lc -37.78
  • Accessibility lens

    • Base#3B82F6
    • 300#7BB2FF
    • 500#3B82F6
    • 700#0B48A4

    Toggle a lens to preview this color under color vision differences.

How does shadcn Primary Blue go from primitive to component?

  1. Primitive
  2. Semantic
  3. Component

Primitive

The raw value, before it means anything.

hex
#3B82F6
oklch
oklch(0.623 0.188 259.80)

Semantic

Bound to a role token that UI reads by name.

--primary: #3B82F6

One primitive feeds the role. --primary then drives --ring and the hover and active states below, so a single value stays in sync everywhere.

Component

Applied to real UI across states.

AA5.70:1
DefaultSave paletteNew
HoverSave paletteNew
ActiveSave paletteNew
DisabledSave paletteNew

On-color text: black (5.70:1 on #3B82F6).

How does shadcn Primary Blue scale from 50 to 950?

shadcn Primary Blue
50 to 950
#E7F6FF
#C5E0FF
#A0C9FF
#7BB2FF
#5A9AFF
#3B82F6
#2164CF
#0B48A4
#002F76
#00174C
#000325
  • 50oklch(0.965 0.020 233.85)
  • 100oklch(0.897 0.052 251.98)
  • 200oklch(0.826 0.088 255.49)
  • 300oklch(0.757 0.126 256.93)
  • 400oklch(0.691 0.163 259.18)
  • 500oklch(0.623 0.188 259.81)
  • 600oklch(0.525 0.179 259.79)
  • 700oklch(0.426 0.160 259.76)
  • 800oklch(0.328 0.131 259.59)
  • 900oklch(0.231 0.103 261.49)
  • 950oklch(0.132 0.074 263.86)

How does shadcn Primary Blue score on WCAG 2.2 contrast?

Every fg × bg combination, with WCAG 2.2 verdicts.

AAA (7:1+)
AA (4.5:1+)
Below AA (under 4.5:1)
Select a pair for ratio and APCA Lc

Does shadcn Primary Blue pass WCAG 2.2 on common neutral backgrounds?

  • Aa3.67Below AA

    White #FFFFFF

  • Aa3.37Below AA

    Neutral 100 #F5F5F5

  • Aa2.91Below AA

    Neutral 200 #E5E5E5

  • Aa1.45Below AA

    Neutral 400 #A3A3A3

  • Aa2.12Below AA

    Neutral 600 #525252

  • Aa4.87AA

    Neutral 900 #171717

  • Aa5.70AA

    Black #000000

What palettes pair with shadcn Primary Blue?

  • Analogous

    • #3BF6CE
    • #3BD0F6
    • #3B82F6
    • #423BF6
    • #903BF6
  • Complementary

    • #84B1F9
    • #3B82F6
  • Triadic

    • #3B82F6
    • #0953CC
    • #F63B82

Where should you use shadcn Primary Blue in production UI?

bars: primary-500 vs secondary-500
Monthly revenue
$48,219
text: neutral-900
+12.4%accent-50 / accent-700
This period Last period
JanFebMarAprMayJun
bg: primary-700 · fg: white
Step 2 of 3
Export your first design system this week.
Continue white / primary-700Skip for now
bg: accent-50 · fg: accent-700
3 tokens changed
Review them before your next export.
Review changes
avatars: solid fills · tags: tints
Team
MOprimary-700 / whiteJLsecondary-600 / whiteARaccent-500 / black+3neutral-700 / white
Newprimary-700 / whiteLiveaccent-50 / accent-700In reviewsecondary-50 / secondary-700Draftneutral-50 / neutral-700
focus: primary-500 · border: neutral-500
Project name
Paletta web
border: primary-500 · ring: primary-100
Used in exported token names.
primary-500 / blackInclude dark mode
Add high contrast theme
Create projectprimary-700 / whiteCancel
active tab: primary-600 · rules: neutral-100
All projectsSharedArchived
ProjectStatus
Marketing site
Updated 2h ago
Liveaccent-50 / accent-700
Mobile app
Updated yesterday
In reviewsecondary-50 / secondary-700
Docs
Updated 3d ago
Draftneutral-50 / neutral-700
toggle: primary-500 · progress: secondary-500
Notifications
Weekly digestprimary-500 / card
Product updatesneutral-500
Token quota640 of 1,000
secondary-500 on neutral-50
bg: neutral-900
--primary#3B82F6
--secondary#6657DA
--accent#57CADA
--neutral#787E87
line: accent-600
Active users
12,480
+8.1% this weektext: accent-700
icon: secondary-600 · action: primary-600secondary-600 / white
Palette exported
tokens.css is ready to use.
Undo

Notes on shadcn Primary Blue

As the shadcn --primary token, this blue drives buttons, focus rings, links, and the whole default theme from one value at oklch(0.623 0.188 259.8). The number to remember is the button: white primary-foreground text on a #3B82F6 fill reaches only AA Large (3.67:1) under WCAG 2.2, fine for the standard large label but tight for small text, so bump the size or darken the token a stop for dense UI. The same blue as text on a near-black card is stronger at AA (5.70:1, APCA Lc -37.78), so dark mode is friendlier here. For a secondary or ring accent, the triad offers a deep #0953CC and a pink #F63B82, while #84B1F9 gives a muted hover. Under the accessibility lens it stays reliably blue for protanopia and deuteranopia (near #5650D3); tritanopia shifts it teal (#3FC4BF), so keep blue and teal apart by more than hue. See the Tailwind Blue 500 page for the same hex framed as a utility class.

shadcn :root block

:root {
  --background: 240 6.7% 97.1%;
  --foreground: 220 5.9% 10%;
  --card: 0 0% 100%;
  --card-foreground: 220 5.9% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 220 5.9% 10%;
  --primary: 217.2 91.2% 59.8%;
  --primary-foreground: 220 5.9% 10%;
  --secondary: 240 2.7% 92.7%;
  --secondary-foreground: 220 5.9% 10%;
  --muted: 240 2.7% 92.7%;
  --muted-foreground: 215 6.2% 38%;
  --accent: 187.5 66.7% 88.2%;
  --accent-foreground: 220 5.9% 10%;
  --destructive: 0 72.2% 50.6%;
  --destructive-foreground: 240 6.7% 97.1%;
  --border: 220 4.9% 88%;
  --input: 216 5.9% 50%;
  --ring: 217.2 91.2% 59.8%;
  --radius: 0.5rem;
}

.dark {
  --background: 210 6.7% 5.9%;
  --foreground: 240 6.7% 97.1%;
  --card: 220 5.9% 10%;
  --card-foreground: 240 6.7% 97.1%;
  --popover: 220 5.9% 10%;
  --popover-foreground: 240 6.7% 97.1%;
  --primary: 217.2 91.2% 59.8%;
  --primary-foreground: 0 0% 0%;
  --secondary: 210 2.3% 17.3%;
  --secondary-foreground: 240 6.7% 97.1%;
  --muted: 210 2.3% 17.3%;
  --muted-foreground: 216 7% 58.2%;
  --accent: 186.7 100% 17.5%;
  --accent-foreground: 240 6.7% 97.1%;
  --destructive: 3.6 84.7% 61.6%;
  --destructive-foreground: 210 6.7% 5.9%;
  --border: 220 6.5% 18%;
  --input: 215 6.2% 38%;
  --ring: 217.2 91.2% 59.8%;
  --radius: 0.5rem;
}

How do you export shadcn Primary Blue as design tokens?

Export a W3C DTCG token document for the shadcn Primary Blue 50 to 950 scale, ready for Style Dictionary or any DTCG aware pipeline.

FAQ

Frequently asked questions

shadcn Primary Blue (#3B82F6) is oklch(0.623 0.188 259.8) in the OKLCH color space.

shadcn Primary Blue passes WCAG 2.2 AA on black for normal text. Contrast ratios: 3.67:1 on white, 5.7:1 on black.

On white, shadcn Primary Blue has an APCA Lc of 63.9. On black, Lc is -37.8. APCA is a perceptual contrast model, not a WCAG compliance standard.

Paste the snippet above into your globals.css (with :root and .dark blocks).

Under deuteranopia (most common, around 5 percent of men), shadcn Primary Blue simulates to #5650d3. Under protanopia it shifts to #5a5ada. Under tritanopia it appears as #3fc4bf. Always pair color with shape, label, or icon for accessibility.

Ready to build your color system?

Free forever, no credit card, Pro when you need more.

Built by a product designer who ships to code.