Color Converter
Convert colors between HEX, RGB, and HSL formats with a live preview.
Lightness60%
Pick from Image
Color Format Guide
HEX: #RRGGBB — 6 hex digits, most common in CSS. RGB: rgb(R, G, B) — 0-255 per channel, intuitive for mixing. HSL: hsl(H, S%, L%) — Hue (0-360°), Saturation, Lightness — easiest for human color selection. HSV/HSB: Hue, Saturation, Value — used in design tools like Photoshop and Figma.
CSS Color Tips
Modern CSS supports all formats plus new ones like oklch() and color(). Use HSL for programmatic color manipulation — adjusting lightness creates consistent tints and shades. CSS custom properties with HSL make theme systems easy. opacity can be added as a 4th value: rgba(255,0,0,0.5) or #FF000080.
/* CSS color formats */ color: #3b82f6; color: rgb(59, 130, 246); color: hsl(217, 91%, 60%); /* With transparency */ color: rgba(59, 130, 246, 0.5); color: hsla(217, 91%, 60%, 0.5); color: #3b82f680; /* Modern CSS */ color: oklch(0.7 0.15 250);
Frequently Asked Questions
- When should I use HEX vs RGB vs HSL?
- HEX is most compact for CSS. RGB is intuitive when you think in red/green/blue channels. HSL is best for creating color palettes — you can adjust lightness and saturation independently while keeping the hue consistent.
- How do I create a color palette from one color?
- Use HSL. Keep the hue fixed, then vary saturation and lightness. For example, your primary at hsl(217, 91%, 60%) becomes a light tint at hsl(217, 91%, 95%) and a dark shade at hsl(217, 91%, 30%).
Guides
Related Tools
JSON Formatter & Validator
Format, validate, and minify JSON with syntax highlighting.
HTML Entity Encoder/DecoderEncode special characters to HTML entities or decode them back.
Lorem Ipsum GeneratorGenerate placeholder text in paragraphs, sentences, or words.
Text Diff CheckerCompare two blocks of text and see the differences highlighted.