Web Developer Quick Reference

HTML Color Codes & Hex Chart: The Complete Web Developer Cheat Sheet

By Pikka Developer Tools • Published November 2026 • Hex, RGB, Shorthand & 8-Digit Alpha Reference

In HTML, CSS, and modern web application development, colors are defined using hexadecimal color codes—a base-16 numbering system that tells web browsers and graphics engines exactly how much Red, Green, and Blue light to illuminate on screen.

Whether you are building web pages in vanilla CSS, configuring Tailwind CSS theme tokens, or styling component libraries like shadcn/ui, this cheat sheet provides an instant reference for standard hex codes, RGB conversions, shorthand syntax, and alpha transparency channels.

Curated HTML & CSS Hex Code Reference Tables

Click any hex code button to copy its value directly to your clipboard:

Primary & Vibrant Tones

Color Name Hex Code RGB Value Recommended Web UI Use
Crimson rgb(220, 20, 60) High-urgency alerts, error banners, destructive action buttons.
Royal Blue rgb(65, 105, 225) Corporate SaaS navigation, primary CTAs, active links.
Lime Green rgb(50, 205, 50) Success notifications, verification badges, yield metrics.
Gold rgb(255, 215, 0) Pro tier badges, star ratings, gamification streaks.
Deep Orange rgb(255, 69, 0) Sale urgency badges, checkout countdowns, heat maps.
Dark Violet rgb(148, 0, 211) AI workspaces, Web3 tokens, creative software UI.

Cool Blues, Cyans & Teals

Color Name Hex Code RGB Value Recommended Web UI Use
Navy Blue rgb(0, 0, 128) Enterprise financial suites, legal footers, high-trust text.
Steel Blue rgb(70, 130, 180) Technical documentation, secondary buttons, sidebar icons.
Deep Sky Blue rgb(0, 191, 255) Active tab pills, focus rings, hover state indicators.
Dark Cyan rgb(0, 139, 139) Data visualization charts, health telemetry, metrics.
Medium Sea Green rgb(60, 179, 113) Status OK pills, transaction confirmed alerts.
Cadet Blue rgb(95, 158, 160) Subtle table borders, secondary card containers.

Warm Earth, Browns & Oranges

Color Name Hex Code RGB Value Recommended Web UI Use
Sienna rgb(160, 82, 45) Warm artisan eCommerce, organic lifestyle product cards.
Chocolate rgb(210, 105, 30) Culinary and coffee packaging, autumn editorial design.
Goldenrod rgb(218, 165, 32) Warning callouts, caution alerts, highlighted search text.
Coral rgb(255, 127, 80) Modern DTC brands, mobile onboarding carousels.
Tomato rgb(255, 99, 71) Notification dots, unread count badges, live indicators.
Maroon rgb(128, 0, 0) Luxury retail headers, editorial quotes, dark mode wine.

Modern Grayscale & Obsidian Neutrals

Color Name Hex Code RGB Value Recommended Web UI Use
White rgb(255, 255, 255) Standard light canvas, card background, high-contrast text on dark.
Snow / Off-White rgb(250, 250, 250) Modern Tailwind slate-50 canvas, eliminating ocular glare.
Light Gray / Border rgb(226, 232, 240) 1px hairline cell dividers, input border outlines.
Slate Gray rgb(112, 128, 144) Secondary body copy, timestamps, muted metadata labels.
Charcoal / Gunmetal rgb(45, 55, 72) High-contrast dark mode card surfaces, terminal backgrounds.
Black / Obsidian rgb(15, 23, 42) Slate 900 typography, deep root canvas in pro dark mode.

The Anatomy of Hex Color Codes

Understanding how web browsers interpret hexadecimal values allows you to write, tweak, and debug CSS colors without relying on guesswork:

1. Standard 6-Digit Hex (#RRGGBB)

A standard 6-digit hex code begins with a hash symbol (#) followed by three two-digit hexadecimal pairs representing Red, Green, and Blue channels:


/* Format: #RR GG BB */
#FF0000 /* Pure Red   (R: 255, G: 0,   B: 0)   */
#00FF00 /* Pure Green (R: 0,   G: 255, B: 0)   */
#0000FF /* Pure Blue  (R: 0,   G: 0,   B: 255) */
#FFFFFF /* Pure White (R: 255, G: 255, B: 255) */
#000000 /* Pure Black (R: 0,   G: 0,   B: 0)   */

Because hexadecimal uses base-16 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F), the lowest value is 00 (decimal 0, zero intensity) and the highest is FF (decimal 255, 100% full intensity).

2. 3-Digit Shorthand Hex (#RGB)

CSS allows a 3-digit shorthand when each pair of hex characters is identical:

  • #FFF expands automatically in the browser engine to #FFFFFF.
  • #F00 expands to #FF0000.
  • #09C expands to #0099CC.

Note: Shorthand hex offers 4,096 distinct colors (16 × 16 × 16), compared to the 16.7 million colors available in 6-digit hex (256 × 256 × 256).

3. 8-Digit Alpha Hex Codes (#RRGGBBAA)

All modern browsers (Chrome, Safari, Firefox, Edge) natively support 8-digit hex codes where the last two digits represent the alpha transparency channel (#RRGGBBAA):


/* 8-Digit Alpha Hex Examples */
#000000FF /* 100% Opaque Black (Alpha = FF / 255) */
#00000080 /* 50% Semi-Transparent Black (Alpha = 80 / 128) */
#00000040 /* 25% Subtle Shadow Black (Alpha = 40 / 64) */
#00000000 /* 0% Fully Transparent */

Performance Tip: While 8-digit hex codes are convenient in CSS, applying semi-transparent backgrounds to dozens of repeating cards in mobile feeds forces the browser's GPU to composite translucent layers on every scroll frame.

To maintain locked 60Hz and 120Hz frame rates, precompute solid opaque hex values using Pikka's RGBA to HEX Converter.

4. Converting Between Hex, RGB, and Modern OKLCH

Here is a quick JavaScript snippet for converting a 6-digit Hex code into an RGB object in modern web apps:


function hexToRgb(hex) {
  // Remove leading # if present
  hex = hex.replace(/^#/, '');
  
  // Handle 3-digit shorthand
  if (hex.length === 3) {
    hex = hex.split('').map(c => c + c).join('');
  }
  
  const num = parseInt(hex, 16);
  return {
    r: (num >> 16) & 255,
    g: (num >> 8) & 255,
    b: num & 255
  };
}

// Example: hexToRgb('#4169E1') -> { r: 65, g: 105, b: 225 }

Essential Web Developer Color Tools & Directories

Streamline your front-end styling with Pikka's high-precision developer tools:

Pick Any On-Screen Hex Code with Precision

Need to extract exact hex codes from an image, logo, or screenshot? Use Pikka's browser loupe or desktop app to sample colors instantly.

Open Image Color Picker