Color Converter Tool

Convert between HEX, RGB, HSL, CMYK, LAB & 15+ formats — with WCAG accessibility checks built in.

Loading ...

Color Converter

Free color converter: HEX, RGB, HSL, CMYK, LAB, OKLAB & more • WCAG contrast checker + palette generator • 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

Color Converter Tool – HEX to RGB, HSL, CMYK & WCAG Checker

Convert between HEX, RGB, HSL, CMYK, LAB, OKLAB and over 15 other color formats instantly. This free online color converter also features a built-in WCAG contrast checker, palette generator, and one-click code export for developers and designers.

Whether you are building responsive websites, designing mobile apps, or preparing print layouts, our tool translates colors across every major format with mathematical accuracy—no signups, no tracking, and zero cost.

Why professionals trust this color converter: Convert a single HEX code into 15+ formats, verify accessibility contrast ratios, generate harmonious color palettes, and export ready-to-use CSS, SCSS, Tailwind configs, or PNG/SVG files. Everything runs instantly in your browser.

Key Features

  • Instant Color Conversion: Type a HEX, RGB, or HSL value and watch all formats update in real-time with pixel-perfect accuracy.
  • WCAG 2.1 Contrast Checker: Automatically calculate contrast ratios against white and black backgrounds with clear AA/AAA pass-fail badges for accessibility compliance.
  • Smart Palette Generator: Create 11-step lightness-based color variations from any base color for consistent design systems.
  • One-Click Code Copy: Instantly copy CSS variables, SCSS variables, RGBA values, GLSL vec4, or raw color strings with dynamic tooltips.
  • Multi-Format Export: Download palettes as PNG or SVG, or copy directly to Tailwind config, Design Tokens JSON, Android XML, SwiftUI, CSV, and Markdown tables.
  • Shareable Links & History: Generate direct URLs with your color pre-loaded and access your recent 64 colors via local browser storage.

Supported Color Formats

This free hex to rgb converter handles 18+ color models used across web development, print publishing, video production, game design, and scientific applications. All conversions happen locally in your browser for maximum speed and privacy.

Format Primary Use Case Example Output
HEX / Short HEX Web CSS, HTML design #E34A85or#E48
RGB / RGBA CSS, Canvas, JavaScript rgb(227, 74, 133)
HSL / HSLA CSS animations, theming hsl(335, 73%, 59%)
CMYK Print design, publishing cmyk(0%, 67%, 41%, 11%)
LAB / LCH Color science, perceptual matching lab(55%, 62, -12)
OKLAB / OKLCH Modern CSS, HDR displays oklab(0.62, 0.18, -0.04)
HSV / HWB Color pickers, intuitive editing hsv(335°, 67%, 89%)
CIE XYZ / YCbCr Video processing, color management xyz(0.312, 0.189, 0.098)
Decimal / Vec4 Game development, shaders vec4(0.890, 0.290, 0.522, 1.000)

Export Palette & Generate Ready-to-Use Code

Stop manually formatting colors for your projects. Click the Export button to instantly copy or download your palette in the exact format your workflow requires:

  • CSS Variables & SCSS Maps: Ready-to-paste custom properties or preprocessor maps for modern theming.
  • Tailwind CSS Config: Auto-mapped to the 50–900 scale for immediate integration intotailwind.config.js.
  • Design Tokens JSON: W3C-compliant format for cross-platform design systems and Figma/Storybook sync.
  • CSS-in-JS (TypeScript): Type-safe color objects withas constfor React, Next.js, and Vue projects.
  • Markdown & CSV: Documentation-ready tables and spreadsheet exports with contrast data for QA and product teams.
  • Android colors.xml & SwiftUI: Mobile-ready resource files with automatic dark-mode suggestions.
  • PNG & SVG Downloads: High-quality visual palettes for presentations, client handoffs, and print references.

Built-In WCAG Accessibility Checker

Do not guess if your color meets readability standards. This contrast ratio calculator automatically tests against pure white (#FFFFFF) and pure black (#000000) backgrounds, displaying clear compliance results for web accessibility.

WCAG 2.1 Guidelines at a glance:

  • AA Normal Text: 4.5:1 contrast ratio or higher
  • AA Large Text: 3:1 contrast ratio or higher
  • AAA Enhanced: 7:1 contrast ratio or higher

Essential for ensuring your UI text, buttons, and interactive components remain readable for all users, including those with visual impairments. Use our free color contrast checker before shipping any design to production.

How to Use This Color Converter

  1. Enter a color: Type a HEX code (e.g.,#E34A85), paste an RGB value, or pick visually using the native color picker.
  2. Fine-tune values: Use the RGB sliders, opacity control, or number inputs for pixel-perfect adjustments.
  3. Copy instantly: Click any output field or use the copy dropdown to grab formatted strings for your codebase.
  4. Generate a palette: Scroll down to see 11 harmonious lightness variations based on your base color.
  5. Export or share: Download PNG/SVG visuals, copy framework-specific code, or generate a direct URL with your color pre-loaded.

Pro Tip: PressCtrl+Shift+Cto instantly copy the current HEX code to your clipboard.

Frequently Asked Questions

How do I convert HEX to RGB for CSS? Paste your HEX code into the input field. The tool instantly calculates and displays the exactrgb()andrgba()values. Click the copy button to paste directly into your stylesheet.

Can I export my color palette for Tailwind CSS? Yes. Click the Export button and select Tailwind Config. The tool generates a ready-to-pastetailwind.config.jssnippet with your palette mapped to the standard 50–900 utility scale.

What is the difference between HSL and RGB? RGB defines colors by mixing red, green, and blue light values, which matches digital screens. HSL uses hue, saturation, and lightness, making it much easier for humans to adjust shades and tints. Our tool shows both so you can work in your preferred format.

Is this color converter free and privacy-safe? Completely free with no signups, ads, or tracking. All calculations run locally in your browser. Your recent color history is stored securely in your browser's local storage only.

Can I use the CMYK output for professional printing? Yes, our CMYK converter provides a highly accurate mathematical approximation. However, for commercial print jobs, always verify colors with your printer's specific ICC profile and request a physical proof.

Streamline Your Design & Development Workflow

Bookmark this page for daily use, share it with your design team, or integrate the exported tokens into your CI/CD pipeline. Built for frontend developers, UI/UX designers, and accessibility specialists who demand precision, speed, and framework-ready output.

New color formats, export templates, and accessibility features are added regularly based on community feedback.

0.0441