Skip to content
LinkedInX

Color Theory for UI Styling

5 min read + 15 min hands-on

Target audience: Anyone writing styling prompts who wants to go beyond "use blue" to specify exact palettes and relationships.

Each color carries associations that vary across cultures but share broad patterns. When writing prompts, state both the color and its intended role.

Energy, urgency, passion. Draws attention immediately.

Use red (#EF4444) exclusively for destructive actions (delete, remove),
error messages, and required field indicators.
Do not use red for decorative elements.

Trust, stability, professionalism. The most universally safe choice for primary interfaces.

Use blue (#3B82F6) as the primary action color for buttons, links,
and active navigation states. Conveys reliability for a finance dashboard.

Growth, success, safety. Signals that something went right.

Use green (#10B981) for success messages, completed states,
positive metrics (revenue up, score increase), and eco-friendly brand elements.

Optimism, creativity, caution. Attracts attention without the urgency of red.

Use yellow (#F59E0B) for warning states, highlight badges,
and new feature labels. Pair with dark text (#1F2937) for legibility.

Luxury, creativity, mystery. Works well for premium tiers and creative tools.

Use purple (#8B5CF6) as the accent color for the "Pro" plan badge
and upgrade CTAs. Signals premium value.

Neutrality, sophistication, balance. The backbone of most UI color systems.

Use gray (#6B7280) for secondary labels, placeholder text, dividers,
and disabled states. Reserve darker grays (#1F2937) for primary text.

Distribute color in three proportions to create balanced designs without visual chaos.

RoleProportionExample
Dominant (background, large surfaces)60%White or dark gray
Secondary (cards, sidebars, sections)30%Light gray or muted tone
Accent (buttons, links, highlights)10%Brand primary color
Apply the 60-30-10 rule:
60% white (#FFFFFF) for page background and large areas,
30% light gray (#F3F4F6) for card surfaces and sidebars,
10% blue (#3B82F6) for buttons, links, and active states.

Colors directly opposite on the color wheel. Creates high contrast and visual tension — use sparingly for maximum impact.

Common complementary pairs:

  • Blue + Orange
  • Purple + Yellow
  • Green + Red (avoid for accessibility — use with caution near error states)
Use blue (#3B82F6) as the primary color and orange (#F97316) as a
highlight accent for sale badges and promotional elements. 
Apply orange to no more than 5% of the interface.

Colors adjacent on the color wheel. Creates harmony and cohesion — ideal for gradients and subtle variations.

Common analogous groups:

  • Blue, Indigo, Purple
  • Green, Teal, Cyan
  • Orange, Amber, Yellow
Use an analogous palette of blue (#3B82F6), indigo (#6366F1),
and cyan (#06B6D4) for the hero section gradient and branded backgrounds.

NameHexBest use
Blue#3B82F6Primary actions, finance, corporate
Red#EF4444Errors, destructive actions, warnings
Green#10B981Success states, growth, eco
Yellow#F59E0BWarnings, highlights, attention
Purple#8B5CF6Premium, creative, luxury
Pink#EC4899Playful, fashion, lifestyle
Indigo#6366F1Tech, sophisticated, calm
Gray#6B7280Neutral text, borders, disabled
Orange#F97316Energy, food, gaming
Teal#14B8A6Health, balance, modern
Cyan#06B6D4Tech, fresh, airy
Emerald#059669Financial gain, nature, eco
NameHexNameHex
Lime#65A30DAmber#D97706
Rose#F43F5EViolet#7C3AED
Fuchsia#D946EFSky#0EA5E9
Slate#64748BZinc#71717A
Neutral#737373Stone#78716C

Primary color — Use for main actions, links, and brand elements (5–10% of the interface)

Secondary color — Use for supporting elements and secondary actions (15–20% of the interface)

Neutral colors — Use for text, backgrounds, and borders (70–80% of the interface)

Semantic colors — Reserve red for errors, green for success, yellow for warnings — don’t use them as decorative colors


Use these when you want a cohesive multi-color system without building one from scratch.

Use the modern palette:
Primary blue (#3B82F6), supporting gray-100 (#F3F4F6),
gray-800 (#1F2937), and blue-600 (#2563EB).
Clean and professional for SaaS applications.
Use the vibrant palette:
Primary purple (#8B5CF6), pink (#EC4899), yellow (#F59E0B),
and green (#10B981). Energetic for creative and youthful brands.
Use the earth palette:
Amber (#D97706), orange (#F97316), green (#10B981),
and stone (#78716C). Warm and natural for food, wellness, and eco brands.
Use a monochrome palette:
gray-900 (#111827), gray-700 (#374151), gray-500 (#6B7280),
gray-300 (#D1D5DB), white (#FFFFFF).
Elegant and content-focused for editorial and blog designs.
Use the ocean palette:
blue-900 (#1E3A5F), blue-700 (#1D4ED8), cyan-500 (#06B6D4),
teal-400 (#2DD4BF). Trustworthy for financial and data-driven interfaces.
Use the sunset palette:
orange (#F97316), red (#EF4444), pink (#EC4899),
purple (#8B5CF6), yellow (#F59E0B).
Dynamic and energetic for gaming, entertainment, and social platforms.

See the references for the external specifications and background sources used on this page.[1][2]

  1. W3C Web Accessibility Initiative, WCAG 2 Overview
  2. MDN Web Docs, Learn web development