Hex to RGB Converter & Professional Color Format Tool

Convert HEX to RGB, HSL, CMYK, and LAB instantly. Check WCAG 2.1 contrast with live previews, generate color palettes, and copy CSS or SCSS variables. Free, fast, and mobile-ready.

Loading ...

Hex to RGB Converter

Instant HEX to RGB, HSL, CMYK & LAB • WCAG 2.1 contrast checker • Copy CSS/SCSS & export palettes

HEX Value #RGB • #RRGGBB • #RRGGBBAA
#
R
G
B
100%
rgb(52, 152, 219)
rgba(52, 152, 219, 1.00)
hsl(204, 70%, 53%)
hsla(204, 70%, 53%, 1.00)
hsv(204, 76%, 86%)
hwb(204, 20%, 14%)
cmyk(76%, 31%, 0%, 14%)
#39c
3447071
lab(63%, -11, -37)
lch(63%, 39%, 306°)
oklab(0.70, -0.05, -0.14)
oklch(0.70, 0.15, 290°)
xyz(0.25, 0.28, 0.60)
ycbcr(142, 133, 80)
vec4(0.20, 0.60, 0.86, 1.00)
#E34A85
Color Palette
Recent Colors
WCAG 2.1 Contrast
On White
4.52:1
Preview
On Black
4.14:1
Preview

Hex to RGB Converter and Professional Color Format Tool

Instantly translate hexadecimal color codes to RGB, HSL, CMYK, LAB, and thirteen additional formats with real-time precision. Built for frontend developers, UI and UX designers, accessibility specialists, and print professionals, this converter delivers seamless format translation, WCAG 2.1 accessibility compliance with live visual previews, and developer-ready code export directly in your browser. No registration required. No data collection. No compromises.


Supported Color Formats

Format Primary Use Case Example Output
HEX Web and CSS development #E34A85
RGB and RGBA Screen displays and opacity control rgb(227, 74, 133)orrgba(227, 74, 133, 0.67)
HSL and HSLA Intuitive hue and lightness adjustments hsl(337, 73%, 59%)orhsla(337, 73%, 59%, 0.67)
CMYK Print, packaging, and publishing cmyk(0%, 67%, 41%, 11%)
LAB (CIELAB) Professional color grading and perceptual analysis lab(63%, -11, -37)
LCH (D65) Lightness-chroma-hue workflows for intuitive adjustment lch(63%, 39%, 306°)
OKLab and OKLCH Modern perceptual color spaces (CSS Color 4 ready) oklab(0.70, -0.05, -0.14)
HSV and HWB Design systems and creative color pickers hsv(337, 67%, 89%)orhwb(337, 29%, 11%)
CIEXYZ (D65) Device-independent color reference and calibration xyz(0.25, 0.28, 0.60)
YCbCr / YUV Video encoding, compression, and broadcast workflows ycbcr(142, 133, 80)
VEC4 (0-1) Shader programming, Unity, Unreal Engine, GLSL vec4(0.890, 0.290, 0.522, 0.670)
Decimal (Integer) JavaScript, legacy systems, databases, APIs 14902917
Short HEX Optimized CSS syntax when values repeat #E48
CSS Variable Design tokens and modern theming systems --brand-primary: #e34a85;
SCSS Variable Sass and SCSS project architecture $brand-primary: #e34a85;

Color is the silent language of design. This tool helps you speak it fluently across every platform, format, and medium—ensuring your vision arrives exactly as intended.


Core Features

Real-Time Multi-Format Synchronization

Adjust the color picker, type a HEX value, or modify the RGB sliders. Every supported format updates instantly without page reloads. The interface maintains strict synchronization across all outputs, ensuring accurate translation regardless of which input method you choose. Dual copy buttons on every output panel let you copy either the full formatted string or just the raw values—matching the flexibility of the dropdown menu.

WCAG 2.1 Contrast Checker with Live Preview

Calculate contrast ratios against white and black backgrounds while viewing real-time text previews. The tool automatically evaluates compliance against WCAG 2.1 standards and displays clear pass or fail indicators for standard text (4.5:1 minimum), large text (3:1 minimum), and enhanced accessibility tiers (7:1 for AAA). Dynamic text shading ensures the preview remains legible even when testing low-contrast combinations.

Intelligent Color Palette Generation

Generate mathematically balanced gradients that transition smoothly from light to dark across eleven steps. The active color always anchors at its natural lightness position within the spectrum. Each swatch includes hover tooltips displaying the exact HEX value, and clicking any swatch instantly applies it to the converter and copies it to your clipboard. Export the complete palette as a high-resolution PNG or scalable SVG file for style guides, design handoffs, or quick sharing.

Quick Format Access in Preview Area

Instantly copy RGB and RGBA with dedicated one-click buttons pinned to the preview header. Need another format? The integrated quick-copy dropdown gives you immediate access to all 16+ color representations—including HSL, CMYK, LAB, OKLCH, and VEC4—so you can copy any format instantly without scrolling or navigating away.

Developer-Ready Code Export

Copy formatted strings for CSS custom properties, SCSS variables, or raw color values with a single click. Each output card includes dedicated copy buttons for full format or values-only output. All formatting follows modern development standards and is ready for direct integration into stylesheets or design token files.

Persistent History and Local Storage

Your recently viewed colors save automatically to your browser's localStorage. Return to a previous conversion anytime without re-entering values. History items display as clickable swatches with visual indicators for light and dark colors.


How to Use the Converter

  1. Enter a HEX code in the input field, paste from another application, or select a color using the native picker.
  2. Adjust the red, green, and blue sliders or type exact numeric values for precise control.
  3. Use the opacity slider to set transparency; watch RGBA, HSLA, and VEC4 formats update in real time.
  4. Review the live contrast preview to verify readability on both light and dark backgrounds.
  5. Click any copy button to copy a value to your clipboard. Use dual buttons on output panels to choose between full format or values-only output.
  6. Generate a palette, save recent colors to your local history, or click the share button to create a direct link to your selected color.

Why Accessibility Compliance Matters

Web Content Accessibility Guidelines require minimum contrast ratios to ensure text remains readable for users with visual impairments, color vision deficiencies, or those viewing screens in bright environments. A ratio of 4.5:1 is required for standard text, while 3:1 is acceptable for large or bold typography. Failing to meet these standards can exclude a significant portion of your audience and impact legal compliance in regulated industries.

This converter calculates ratios using the official WCAG 2.1 luminance formula and provides immediate visual feedback, allowing you to adjust colors before deployment rather than after publication. The live preview shows exactly how your text will appear, helping you make informed decisions about color choices.


Technical Accuracy and Standards

All conversions follow industry-standard formulas and reference specifications:

  • RGB and HEX conversions are mathematically exact with no rounding error
  • Perceptual spaces (LAB, LCH, OKLab, OKLCH) use established transformation matrices with D65 white point reference per ISO 11664-4
  • Contrast calculations implement the official WCAG 2.1 relative luminance algorithm from Section 1.4.11
  • CMYK conversion provides a highly accurate approximation; final print results depend on paper stock, printer calibration, and ICC profiles
  • Video formats (YCbCr, YUV) follow ITU-R BT.601 standards for standard definition workflows

Important for print designers: RGB and HEX are additive color models based on light emission, while CMYK is subtractive and based on ink absorption. Always request a physical proof for critical branding or commercial printing projects.


Frequently Asked Questions

What is the difference between HEX and RGB?

HEX codes are a compact hexadecimal representation of RGB values. Both describe the exact same color data, but HEX uses six characters to represent red, green, and blue channels in base-16 notation, while RGB displays each channel as a decimal number between 0 and 255. HEX is preferred in CSS for brevity, while RGB is more practical for programmatic manipulation and alpha transparency.

Why do some formats show alpha values and others do not?

Only formats designed to support transparency include alpha channels in their standard syntax. RGBA, HSLA, and VEC4 explicitly accommodate opacity values. Traditional formats like RGB, HSL, CMYK, and LAB represent color only; transparency is handled separately in CSS (via theopacityproperty) or design software layers.

How accurate is the WCAG contrast checker?

The tool implements the official W3C formula:contrast = (L1 + 0.05) / (L2 + 0.05)where L1 and L2 are relative luminance values calculated per WCAG 2.1 Section 1.4.1. Results match the W3C's own contrast checker and are suitable for accessibility audits and compliance documentation.

Can I safely convert HEX to CMYK for print projects?

This converter provides a highly accurate mathematical approximation for CMYK values using standard conversion matrices. However, final print results depend on paper stock, printer calibration, ink formulations, and ICC color profiles. Always request a physical proof for critical branding or commercial printing to verify color accuracy.

How do I share a specific color with my team?

Click the share button to generate a direct link containing your current HEX value and opacity setting. The URL preserves the exact color state and loads the tool with all outputs synchronized to that selection. You can paste the link into email, messaging platforms, or project management tools for seamless collaboration.

Does this tool store my color data or track usage?

No. All processing occurs locally in your browser. Recent colors are stored only in your device's localStorage for convenience and are never transmitted to external servers. The tool contains no analytics, tracking scripts, advertising, or data collection mechanisms.

Why does the Decimal panel have only one copy button?

Decimal format has only one valid representation (an integer), so a single copy button is provided for clarity and consistency with the dropdown menu's single-button layout for decimal values.

Can I use this tool offline?

Yes. After the initial page load, all functionality works without an internet connection. Conversions, palette generation, copying, and history management operate entirely client-side.


Built for speed, accuracy, and accessibility. No registration required. No external dependencies. No tracking. Fully optimized for modern development workflows and accessible to users of all experience levels.

0.0651