Skip to main content

Color Format Converter - HEX, RGB, HSL Converter

Convert colors between HEX, RGB, RGBA, HSL, HSLA, and CSS named color formats. Includes a color picker and real-time preview.

Runs in browser - Tool input is not submitted color hex rgb hsl
R
G
B
H°
S%
L%
HEX
-
RGB
-
HSL
-
RGBA
-
CSS var
-
Closest Tailwind
-

Convert colors without changing their appearance

Design tools, CSS, Tailwind, and APIs all use different color formats - You might receive a color as HEX from a designer, need RGB values for a CSS animation, and HSL for dynamic lightness adjustments in a theme. This converter handles all three input formats interchangeably, generates all output representations simultaneously, and even suggests the closest Tailwind CSS utility class - Saving time context-switching between tools. Pair it with the markdown previewer and image to Base64 tool in the developer tools category.

Formats side by side

Enter one color and compare its HEX, RGB, HSL, and RGBA notation before copying the syntax required by the destination.

Tints & shades strip

A visual strip shows ten tints from full color to white, helping you build consistent color scales for UI design systems or Tailwind config files.

Bidirectional input

Change the HEX field, RGB numbers, HSL controls, or native color picker and the other representations update from the same color value.

Color format comparison

Each color format has different strengths. Knowing which to use in each context avoids conversion friction in your workflow.

Format Example Best for Alpha support
HEX #1B5CDB Design tools, Figma, CSS tokens, Tailwind config #RRGGBBAA (8-digit)
RGB rgb(27, 92, 219) CSS properties, canvas rendering, image processing Via rgba()
HSL hsl(220, 77%, 48%) Dynamic theming, generating color scales, dark mode Via hsla()
RGBA rgba(27, 92, 219, 0.5) Overlays, shadows, semi-transparent UI elements Native (0–1)

Related developer tools

Preview styled documentation alongside your color choices
Encode color data or design tokens for API transport
Inline images and icons alongside your color scheme in CSS
Extract and validate HEX color codes from CSS files with regex