UI color system generator

Generate an accessible UI color system

Pick a sector and tone — or drop in your own brand color — and HexPalette derives the full role set (primary, secondary, accent, surfaces, text, and success/warning/error states) in OKLCH, with every intended text pairing checked for WCAG AA contrast. Not five swatches: a system you can ship.

Sector SaaS product Healthcare Finance Crypto & Web3 E-commerce Dashboard
Tone Professional Calm Bold Playful Luxury
Theme Light Dark Primary & Accent stay fixed; surfaces, text and states flip. The export ships both.
Brand color
Brand
#765BC6
Primary
White text 5.1:1 AA
#966795
Secondary
Black text 4.7:1 AA
#6D944A
Accent
Black text 6.0:1 AA
Button states
#6549B2
Primary hover
6.7:1 AA label
#583AA2
Primary active
pressed state
#C7C4DD
Primary disabled
muted, non-interactive
#845683
Secondary hover
3.6:1 AA Large label
Links & focus
#50762C
Link
on background 4.9:1 AA
#3D6215
Link hover
on background 6.6:1 AA
#6B9544
Focus ring
ring 3.2:1 AA Large
#EBE6FF
Selected bg
Text 12.9:1 AAA
Surfaces
#F7F5FF
Background
base surface
#FCFBFF
Surface
Text 15.2:1 AAA
#E8E5FB
Border
subtle, non-text
Inputs
#FDFCFF
Input bg
Text 15.4:1 AAA
#D1CEE4
Input border
field edge
#6B9544
Input focus
matches focus ring
Text
#242131
Text
on background 14.6:1 AAA
#726D8A
Muted text
on background 4.6:1 AA
Success
#1B7D3D
Success
on background 4.8:1 AA
#FFFFFF
On Success
5.2:1 AA on Success
#BDFAC8
Success container
Text 4.7:1 AA
#21763C
On Success container
on container 4.7:1 AA
Warning
#9B5F00
Warning
on background 4.8:1 AA
#FFFFFF
On Warning
5.2:1 AA on Warning
#FFDDA7
Warning container
Text 4.7:1 AA
#8F5300
On Warning container
on container 4.7:1 AA
Error
#BF473F
Error
on background 4.6:1 AA
#FFFFFF
On Error
5.0:1 AA on Error
#FFD1C8
Error container
Text 4.6:1 AA
#9C443C
On Error container
on container 4.6:1 AA

In a real trading app

ChainDesk Markets Wallet Swap
Portfolio value
$24,918.60
▲ 5.7% 24h
BTC +3.4%
ETH −1.8%
Connect wallet Swap History
Swap confirmed on-chain.
Confirmed Pending Failed

Every intended pairing here — text, buttons and states — meets WCAG AA by construction.

Export light + dark

:root {
  --primary: #765BC6;
  --on-primary: #FFFFFF;
  --primary-hover: #6549B2;
  --primary-active: #583AA2;
  --primary-disabled: #C7C4DD;
  --secondary: #966795;
  --secondary-hover: #845683;
  --accent: #6D944A;
  --link: #50762C;
  --link-hover: #3D6215;
  --focus-ring: #6B9544;
  --selected-bg: #EBE6FF;
  --background: #F7F5FF;
  --surface: #FCFBFF;
  --border: #E8E5FB;
  --input-bg: #FDFCFF;
  --input-border: #D1CEE4;
  --input-focus: #6B9544;
  --text: #242131;
  --muted: #726D8A;
  --success: #1B7D3D;
  --warning: #9B5F00;
  --error: #BF473F;
  --on-success: #FFFFFF;
  --success-container: #BDFAC8;
  --on-success-container: #21763C;
  --on-warning: #FFFFFF;
  --warning-container: #FFDDA7;
  --on-warning-container: #8F5300;
  --on-error: #FFFFFF;
  --error-container: #FFD1C8;
  --on-error-container: #9C443C;
}

[data-theme="dark"] {
  --primary: #765BC6;
  --on-primary: #FFFFFF;
  --primary-hover: #8A70DE;
  --primary-active: #9980EF;
  --primary-disabled: #383549;
  --secondary: #966795;
  --secondary-hover: #AC7CAB;
  --accent: #6D944A;
  --link: #A3CD81;
  --link-hover: #B9E497;
  --focus-ring: #A1CE7B;
  --selected-bg: #27223D;
  --background: #13101E;
  --surface: #1D1A2A;
  --border: #302E3E;
  --input-bg: #171620;
  --input-border: #424051;
  --input-focus: #A1CE7B;
  --text: #EEECFB;
  --muted: #A5A0BF;
  --success: #81D493;
  --warning: #F4B76E;
  --error: #F37C71;
  --on-success: #000000;
  --success-container: #073215;
  --on-success-container: #A3F5B4;
  --on-warning: #000000;
  --warning-container: #3E2100;
  --on-warning-container: #FFD083;
  --on-error: #000000;
  --error-container: #451915;
  --on-error-container: #FFBFB3;
}
Download for Procreate
Want to explore colors freely first — harmonies, styles, a base you tweak by hand? Open the palette generator →