HTML Colour Picker — Hex, RGB, HSL, RGBA, HSLA & Hex8

Pick a colour, tweak opacity, convert formats, and check accessibility. 100% client-side.

Colour & Formats

Recents & Favourites

Preview & Contrast

Preview on Light

The quick brown fox

Preview on Dark

The quick brown fox

Preset Palette

Pick, convert, and understand web colors

This HTML color picker helps you find the exact color you need and converts it into the formats used across the web. Whether you are choosing a brand color, matching a UI element, or building a palette, it gives you clear, copy-ready values in Hex, RGB, and HSL. With the alpha slider, you also get RGBA, HSLA, and Hex8 for transparency. Everything happens in your browser, so you can work quickly without installing anything.

Colors in CSS are usually represented in a few common ways. Hex is the classic format you see in style sheets, RGB expresses colors as red/green/blue values, and HSL represents hue, saturation, and lightness, which many people find easier to adjust by eye. Each format describes the same color, just in a different language. This tool lets you move between them instantly so you can use the format that fits your workflow.

How to use the color picker

  1. Use the color panel or eyedropper to choose a color.
  2. Adjust the alpha slider if you need transparency.
  3. Copy the format you need: Hex, RGB, HSL, or their alpha variants.
  4. Paste the value into your CSS, design tool, or code editor.

If you are building a theme, use HSL to create lighter or darker versions by changing lightness. If you are working with scripts or canvas drawing, RGB or RGBA is often the easiest to manipulate. If you need a compact color code for a stylesheet or a design token, Hex or Hex8 keeps things short.

Format basics

  • Hex: #RRGGBB or shorthand #RGB for quick copy and paste.
  • RGB: rgb(30, 144, 255) for script-friendly color values.
  • HSL: hsl(210, 100%, 56%) for easier palette tweaks.
  • Alpha: RGBA, HSLA, and Hex8 add transparency for overlays and UI states.

Accessibility and real-world use

The built-in contrast checker compares your color against light and dark backgrounds and shows WCAG contrast ratings. This is useful when you are choosing text colors, button styles, or link colors that must remain readable. Designers use it for UI themes, developers use it for CSS variables, and content teams use it when matching brand guidelines across documents and web pages.

Whether you are looking for a color picker, a hex to RGB converter, or a tool to check contrast for accessibility, this page gives you a fast, reliable workspace for color decisions.

5 Fun Facts about Web Colours

Hex is camera film math

#RRGGBB mirrors 8-bit channels from early bitmap displays—256 levels per channel, 16.7 million combos from 3 bytes.

Origins

140 named colours are built-in

CSS supports 140 legacy names like rebeccapurple and lightgoldenrodyellow. They’re case-insensitive and map to fixed Hex values.

CSS trivia

Hex8 hides alpha in plain sight

#RRGGBBAA stores transparency as the last two hex digits. CC equals about 80% opacity; 80 is ~50%.

Opacity math

HSL is hue on a 0–360 wheel

Hue numbers wrap around a colour wheel: 0 and 360 are red, 120 green, 240 blue. Lightness 50% sits in the middle.

Hue map

Contrast ratios are logarithmic

WCAG contrast uses relative luminance; 4.5:1 is AA for body text, 3:1 for large text. Doubling contrast isn’t a simple brightness tweak—it’s a math ratio.

Accessibility

Explore more tools