RGB HEX Color Converter - Convert Color Codes Online
Free color converter online: switch between HEX, RGB and HSL instantly, with RGB sliders, a live preview swatch, 3-digit shorthand support and one-click copy.
Last updated: 2026-11-02
Color Converter
RGB input (drag a slider or type a number)
Color preview
Converted values
#1E90FFrgb(30, 144, 255)hsl(210, 100%, 56%)Common colors (click to load)
Note: HEX and RGB are two spellings of the same color: each pair of hex digits in #RRGGBB maps to one RGB component, and #19F is shorthand for #1199FF. HSL describes color by hue, saturation and lightness, which is more intuitive than RGB for shading a hue up and down. Output is uppercase #RRGGBB; 8-digit HEX with an alpha channel (#RRGGBBAA) is accepted on input but the alpha is dropped in conversion. The caption color switches with the swatch brightness: dark text on light colors, white text on dark ones. Everything converts locally and your last color is remembered on this device.
How to use Color Converter
Convert colors online between HEX, RGB and HSL: paste #1E90FF or the shorthand #19F and it parses instantly. Drag the red, green and blue sliders or type exact values, watch the live swatch switch its caption for readability, copy any format in one click, and start from 22 common colors.
- 1
Paste or type a color
Put #1E90FF, #1e90ff or the 3-digit shorthand #19F into the HEX field. 8-digit #RRGGBBAA values are accepted and the alpha is ignored in conversion. Invalid input shows a message under the field and never silently changes the swatch.
- 2
Fine-tune with RGB sliders
Drag the red, green and blue sliders or type numbers from 0 to 255; the two inputs stay in sync and the HEX field follows along. Edit the HEX and the sliders move to match.
- 3
Read the preview swatch
The large swatch on the right mirrors the current color with its HEX value in the corner. The caption color flips between dark and white based on brightness, so light colors are not glaring and dark ones stay legible.
- 4
Copy a format
The results section lists HEX, RGB and HSL, each with a Copy button. Paste straight into CSS, a design tool picker or a frontend variable without reformatting.
- 5
Start from a common color
Twenty-two frequent colors — primaries, secondaries and grays — sit below. Click one to load it as the current color, then adjust from there instead of starting from scratch.
Key features
Three formats at once
HEX, RGB and HSL are computed together; changing any input refreshes all three results, so there is no hopping between lookup pages.
Two-way sliders
RGB sliders and number fields mirror each other — coarse changes by dragging, precise ones by typing — and HEX edits move the sliders too.
Shorthand and 8-digit HEX
The #19F shorthand expands automatically and #RRGGBBAA with an alpha channel is parsed; output is always uppercase 6-digit HEX.
Local with memory
All conversion happens in the browser with no network requests, and the last color is remembered on this device for the next visit.
Common use cases
Picking CSS values
When a mockup gives one format and the stylesheet needs another, paste it here and take HEX, RGB or HSL as needed for variables, gradients or opacity notation.
Checking brand colors
Verify the HEX and RGB numbers from a brand guideline, then copy the exact values for partners or ad platforms instead of relaying colors verbally.
Building shade variants
HSL exposes lightness directly, so deriving hover, pressed and disabled tones of one hue is far quicker than nudging three RGB numbers blindly.
Frontend debugging
DevTools shows colors in whatever format it likes; normalise values to uppercase HEX here to chase down colors that look equal but compare unequal.
Teaching the basics
Demonstrate how RGB components shape a color by dragging sliders live — much more intuitive than walking through hex arithmetic on a whiteboard.
Frequently asked questions
How do HEX and RGB relate?
They encode the same color: each pair of hex digits in #RRGGBB is one RGB component, so #1E90FF is rgb(30, 144, 255) — 1E is 30, 90 is 144, FF is 255. Conversion is lossless either way; choose whichever your tool expects.
Is the 3-digit shorthand supported?
Yes. Each digit is doubled: #19F equals #1199FF. The field also accepts 8-digit #RRGGBBAA and reads its first six digits, but conversion output has no alpha — the HSL output does not carry it either.
Why did my transparency disappear?
This converter focuses on opaque HEX / RGB / HSL values; alpha is read on input but never emitted. To carry transparency, append two hex digits to the copied value or switch the CSS to rgba() or hsla() by hand.
What do the HSL numbers mean?
Hue H runs 0-360 degrees (0 red, 120 green, 240 blue); saturation S and lightness L are percentages. Higher S means more vivid, L runs from black at 0% to white at 100%. Adjust L for shades and H for a different hue instead of guessing three RGB numbers.
Is the swatch caption color fixed?
No. A YIQ brightness check flips the caption between dark gray and white so dark text sits on light colors and white on dark ones, keeping the HEX value readable on every background.
Are my colors uploaded or logged?
No. Conversion happens entirely in the browser and the page makes no network requests. The only record is your last color in localStorage, used to restore the page next time; clearing browser data removes it.
Related tools
Bulk URL Opener
Open a list of URLs in new tabs at once: paste plain lines or any text, extract links automatically, fix missing protocols, dedupe, and export bookmarks.
Morse Code Translator
Translate text to Morse code and Morse back to text as you type. Covers A-Z, digits and punctuation, plays the signal at 5-25 WPM, and includes a full chart.
Online Regex Tester
Free regex tester with live match highlighting, capture group tables and replacement preview. Eight built-in presets, all processed locally in your browser.
HTML CSS JS Formatter
Online HTML, CSS and JS formatter with custom indent, line wrapping and compact mode. Embedded style and script blocks are formatted too, all in your browser.
AES Encrypt & Decrypt
Free AES encryption tool: encrypt text with AES-GCM or CBC via Web Crypto, PBKDF2-hardened passwords, self-contained Base64 output, decrypt with same password.
Base Converter
Free base converter with four linked inputs for binary, octal, decimal and hexadecimal, BigInt-exact for huge integers and 12 fractional digits, with a 0-16 reference table.
URL Encoder and Decoder
Free URL encoder and decoder with three modes (component, whole URL, form data), multi-pass decoding and a query parser that exports key-value pairs as JSON.
UUID Generator
Free UUID v4 generator: create 1 to 1000 UUIDs at once with crypto.randomUUID, switch case and hyphens, export as text, JSON or SQL, and download.
Hash Calculator
Free online hash calculator: get MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC32 for any text or file at once, with per-hash copy and uppercase output.
JSON Formatter
Free JSON formatter: beautify with 2 or 4 spaces, minify, sort keys, and get the exact line and column of a syntax error, plus size, depth and node counts.
