Example
Input
#5b21b6
Output (every format)
HEX: #5b21b6 RGB: rgb(91, 33, 182) HSL: hsl(266, 70%, 42%) OKLCH: oklch(0.45 0.20 290)
Note
Auto-detects HEX, RGB, HSL inputs. Includes a color picker, the EyeDropper API, and a curated palette.
Usage / FAQ
When to use
- Convert HEX to RGB / HSL for CSS (rgba when alpha is needed)
- Transfer colors between Figma and code
- Quickly convert a designer's HSL into HEX
- Document a brand color in every notation at once
- Use the EyeDropper to grab any pixel color on screen
FAQ
- Q.Are 3-digit HEX shortcuts supported?
- A.Yes — `#f60` expands to `#ff6600`. CSS 4's 8-digit hex (#rrggbbaa with alpha) is also recognized.
- Q.What if HSL's H exceeds 360?
- A.H is mod 360 — 380 = 20, -10 = 350. CSS accepts that too, but the tool normalizes to 0-359 in the output.
- Q.What is OKLCH?
- A.A color space added to CSS Color 4 in 2023. Designed so equal L values look equally bright to humans — increasingly standard in design systems.
Fun facts
sRGB was created in 1996 by HP and Microsoft to standardize CRT monitor output (IEC 61966-2-1). It's still the default color space for nearly every web image and HTML color value — even with wide-gamut spaces like Display-P3 around, sRGB lives on as the fallback.
Wikipedia — sRGBDisplay-P3 is Apple's display standard, combining cinema's DCI-P3 color space with sRGB's gamma curve. Adopted starting with iPhone 7 (2016), it's why photos and emoji look more vivid — about 25% wider gamut than sRGB, especially in reds and greens.
WebKit — Display P3Gamma 2.2 appears across color spaces because of how human eyes work — we're sensitive to dark tones and less to bright ones. A nonlinear transfer function (brightness^2.2) distributes 8-bit integers perceptually evenly. Store images in linear RGB (gamma 1.0) and dark regions band horribly.
Wikipedia — Gamma correction
Related guides
- WCAG Color Contrast — AA, AAA, and What the 4.5:1 Ratio Means
How WCAG contrast ratios are calculated, the difference between AA and AAA, what 'large text' means, common UI failures, and APCA (the next-gen formula).
- How Computers Represent Color (RGB, HSL, OKLCH)
What sRGB, P3, RGB, HSL, OKLCH actually mean. Why HSL feels intuitive but breaks visual consistency, why OKLCH is the new default in design systems, and how to read gamut and luminance like a pro.
Related tools
- Image to Base64 (Data URI)
Convert an image file to a Base64 data URI for inline embedding in HTML/CSS/Markdown. Up to 5 MB.
- Image Resize & Compress
Resize, crop, and compress images entirely in your browser. Pick width × height, choose crop or fit mode, adjust JPEG quality. Outputs as {original}_{w}x{h}.{ext}.
- Image Crop
Crop images right in your browser — drag to select, lock aspect ratios (1:1, 16:9…), export PNG/JPEG. No upload.
- Emoji Picker
Pick and copy emojis with one click. Search by name (en/ko), browse by category, and keep your recents and favorites in the browser.
- QR Code Generator
Generate a QR code from any text or URL. Adjustable error correction (L/M/Q/H), SVG output, downloadable.
- Color Contrast Checker
Check the WCAG contrast ratio between two colors. Pass/fail for AA Normal/Large + AAA Normal/Large with a live sample.
- Color Palette Generator
Generate a palette from a single base color — shades, tints, complement, analogous, triad, tetrad. HSL-based. 0 dependency.
- CSS Gradient Generator
Build linear, radial, and conic CSS gradients with color stops + angle/position. Live preview + copy-ready CSS.
- PDF Merge
Merge multiple PDF files into a single document. Drag to reorder pages, all client-side — files never leave your browser.
- PDF Split
Extract a page range from a PDF — e.g. 1-3,5,7-9. All client-side, files never leave your browser.
- PDF Rotate
Rotate all or selected PDF pages by 90°, 180°, or 270°. Useful for scanned documents in wrong orientation. All client-side.
- PDF Watermark
Add a text watermark (CONFIDENTIAL, DRAFT, etc.) to every PDF page. Control opacity, rotation, size, color. All client-side.
- PDF Compress
Re-encode a PDF with object stream compression and metadata stripping. Modest size reduction (text-heavy: 5-20%). Image-heavy PDFs need server-side tools. All client-side.
- Image to PDF
Combine JPG, PNG, and other images into a single PDF — in your browser. Reorder pages, choose A4/Letter or original size. Nothing is uploaded.
- Favicon Generator
Make a favicon from an image, emoji, or text — multi-size favicon.ico, apple-touch-icon, PWA icons + ready HTML/manifest snippets, in your browser.