GrowthGPT
GrowthGPT
AI community platform for modern work

Color Converter

Convert colors between HEX, RGB, HSL, and HSB with live preview and contrast checking.

Color Preview

Live preview updates as you adjust any value.

#

Color Info

Luminance0.2355
vs White3.68:1 (AA Large)
vs Black5.71:1 (AA)

RGB

Red, Green, Blue channels (0 to 255)

rgb(59, 130, 246)

HSL

Hue (0-360), Saturation (0-100), Lightness (0-100)

hsl(217, 91%, 60%)

HSB / HSV

Hue (0-360), Saturation (0-100), Brightness (0-100)

hsb(217, 76%, 96%)

CSS Output

Ready-to-paste CSS color values

color: #3B82F6;
color: rgb(59, 130, 246);
color: hsl(217, 91%, 60%);

What Is a Color Converter

A color converter translates a single color value between the different formats that designers, developers, and browsers use. The same color can be expressed as a HEX code, an RGB triplet, an HSL tuple, or an HSB value depending on where you need to use it. CSS, design tools like Figma, image editors, and print workflows each have preferred formats.

This tool runs entirely in your browser. Enter a color in any format and every other representation updates instantly. No network requests are made and no data leaves your device.

Understanding Color Formats

HEX is the most common format on the web. It encodes red, green, and blue channels as two-digit hexadecimal values joined into a six-character string prefixed with a hash, such as #FF5733.

RGB expresses the same three channels as decimal integers between 0 and 255. It reads more naturally for developers because each channel is explicit: rgb(255, 87, 51).

HSL stands for Hue, Saturation, and Lightness. Hue is a degree on the color wheel (0 to 360), saturation and lightness are percentages. HSL is far more intuitive for creating color palettes because you can adjust lightness without changing the hue.

HSB (also called HSV) uses Hue, Saturation, and Brightness instead of Lightness. It matches how many creative tools like Photoshop and Illustrator represent colors in their pickers. A brightness of 100 with full saturation gives the purest version of a hue.

How to Use This Color Converter

Start by clicking the native color picker or typing a HEX value into the input field. All other format fields update automatically. You can also type directly into any RGB, HSL, or HSB input field and the rest will sync.

Use the copy buttons next to each format to copy the value to your clipboard. The CSS Output section provides ready-to-paste declarations for each format. The Color Info panel shows the relative luminance and WCAG contrast ratios against white and black so you can evaluate accessibility before committing to a palette.

Color Accessibility and Contrast

The Web Content Accessibility Guidelines (WCAG) define minimum contrast ratios between text and background colors to ensure readability for users with low vision or color blindness.

WCAG Level AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt or 14pt bold). Level AAA raises the bar to 7:1 for normal text. These ratios compare the relative luminance of the foreground and background colors, not their perceived brightness.

This tool shows your color's contrast ratio against both white and black so you can instantly determine which background keeps text readable. A ratio below 3:1 fails all WCAG criteria. A ratio above 7:1 passes the strictest AAA standard. Use this information when building accessible interfaces, choosing brand colors, or preparing design tokens.

Frequently Asked Questions

What is the difference between RGB and HEX?

RGB and HEX represent the same color model using different notation. RGB expresses red, green, and blue channels as decimal integers from 0 to 255 (for example, rgb(255, 0, 0) for red). HEX encodes those same three channels as a six-character hexadecimal string prefixed with a hash (for example, #FF0000). They are interchangeable and most CSS color tools accept both formats.

What is HSL?

HSL stands for Hue, Saturation, and Lightness. Hue is the position on the color wheel expressed in degrees from 0 to 360 (red at 0, green at 120, blue at 240). Saturation controls how vivid the color is from 0 percent (gray) to 100 percent (full color). Lightness controls brightness from 0 percent (black) to 100 percent (white). HSL is popular in CSS because it makes it easy to create color families by adjusting just the lightness while keeping the hue constant.

How do I check color contrast for accessibility?

The Color Info panel in this tool shows the WCAG contrast ratio between your selected color and both white and black. A ratio of 4.5:1 or higher passes WCAG AA for normal text. A ratio of 7:1 or higher passes AAA. If you are placing text on a background, ensure the contrast ratio between your text color and background color meets these thresholds. The tool labels each ratio as Fail, AA Large, AA, or AAA based on the WCAG formula.

Does this tool store my data?

No. All color conversions happen locally in your browser using JavaScript. No color values are transmitted to any server. Closing the tab discards everything. There are no accounts, no logs, and no data collection of any kind.

What is a good contrast ratio?

For body text on a screen, aim for at least 4.5:1 against the background. For large headings (18pt or larger) or bold text (14pt or larger), 3:1 is the minimum. For the highest accessibility standard, target 7:1 or above. Black text on white gives a ratio of 21:1 (maximum possible). When in doubt, higher contrast is better because it benefits users with visual impairments in a range of lighting conditions.

Related Tools