Color Format Converter
Convert colors between 18+ formats with channel breakdown and code snippets
Convert colors between 18+ formats instantly. Enter a color in HEX, RGB, HSL, HSV, CMYK, HWB, LAB or CSS name and get all conversions with channel breakdown and ready-to-copy code snippets.
Input Color
≈ mediumslateblue(≈ ΔE 24.3)
Quick Colors
🌐 Web / CSS
#6366f1
#6366f1ff
rgb(99, 102, 241)
rgba(99, 102, 241, 1)
hsl(239, 84%, 67%)
hsla(239, 84%, 67%, 1)
mediumslateblue
🎨 Design
hsv(239, 59%, 95%)
hwb(239 39% 5%)
39%, 40%, 95%
cmyk(59%, 58%, 0%, 5%)
🔬 Perceptual
lab(50.1 38.69 -70.49)
lch(50.1 80.41 298.76)
💻 Code / Dev
--color: #6366f1;
bg-[#6366f1]
UIColor(red: 0.388, green: 0.400, blue: 0.945, alpha: 1.00)
Color.rgb(99, 102, 241)
0.3882, 0.4000, 0.9451
6514417
How it works
Color formats are different ways to represent the same color. This tool supports 18+ formats organized into 5 categories: Web/CSS, Design, Print, Perceptual, and Code.
Web / CSS Formats
HEX / HEX8
6-digit hexadecimal format (#FF5733) or 8-digit with alpha (#FF5733FF). The standard in CSS and web design.
RGB / RGBA
Additive light model. Each channel ranges 0-255. RGBA adds transparency (0-1). Example: rgba(255, 87, 51, 0.8)
HSL / HSLA
Hue (0°-360°), Saturation and Lightness (0%-100%). The most intuitive format for programmatic color adjustment. Example: hsl(11, 100%, 60%)
CSS Named Color
The tool automatically detects the closest CSS named color from the 148 standard named colors, showing the ΔE distance.
Design Formats
HSV / HSB
Similar to HSL but uses Value/Brightness instead of Lightness. The native model in Adobe Photoshop and Figma.
HWB (Hue, Whiteness, Blackness)
Modern CSS format that describes colors by mixing a hue with white and black. More intuitive than HSL for humans. Example: hwb(11 20% 0%)
Perceptual Formats
CIE LAB
Perceptually uniform color space. L = lightness (0-100), a = green-red axis, b = blue-yellow axis. Used in color science and Delta E calculations.
LCH (Lightness, Chroma, Hue)
Cylindrical version of LAB. Combines LAB's perceptual uniformity with hue intuitivenes. CSS Color Level 4 supports it natively.
When to use each format?
- HEX: CSS, web design, compact code
- RGB/RGBA: Screens, JavaScript, canvas
- HSL: Creating variations, adjusting hue/saturation
- HSV: Photoshop, Figma, Illustrator
- HWB: Modern CSS, intuitive mixing
- CMYK: Professional printing
- LAB/LCH: Color science, perceptual differences
💡 Practical Use Cases
Case 1: Brand color → CSS Variables
A client sends you #1E90FF. Use the "Code" tab to get CSS variables, SCSS and Tailwind config ready to copy.
Case 2: Cross-platform mobile app
You need the same color in iOS (Swift UIColor), Android (Kotlin) and Flutter (Dart). The code tab generates snippets for all 3 platforms.
Case 3: Analyzing color composition
Use the "Channels" tab for a visual RGB and HSL breakdown with animated bars, plus CMYK, LAB, LCH and HWB values at a glance.
Case 4: Finding the closest CSS name
Enter any color and the tool finds the closest CSS named color (from 148 available) with the ΔE distance to know how similar it is.