Tools › HEX to RGB Color Converter
HEX to RGB Color Converter
Free online color converter: turn HEX into RGB and HSL, or RGB and HSL back into HEX. Paste any CSS color and copy the format you need.
Use it from code
The same function is available as an API endpoint. Free tier: 200 calls per day without a key. Pro lifts the limit.
curl -X POST https://spincrus.uz/api/v1/tools/color-converter \
-H "content-type: application/json" \
-H "x-api-key: YOUR_KEY" \
-d '{"color":"#1e90ff"}' FAQ
How do I convert HEX to RGB?
Split the six hex digits into three pairs and read each pair as a base-16 number. For #1e90ff that gives 1e = 30, 90 = 144 and ff = 255, so the color is rgb(30, 144, 255).
Does the converter accept short HEX codes like #fff?
Yes. A three-digit code is expanded by doubling each digit, so #f80 becomes #ff8800. The leading # is optional.
Why do I get slightly different values when converting back and forth?
HSL values are rounded to whole numbers, so converting HEX to HSL and back can shift a channel by one step. HEX and RGB convert in both directions without any loss.
Related tools
Cron Expression Explainer
Paste any cron expression and get a plain-English explanation instantly. Supports ranges, steps, lists and @daily/@hourly aliases.
Readability Checker
Free readability score calculator: Flesch Reading Ease, Flesch-Kincaid grade, Gunning Fog and ARI, plus word count and reading time.
JSON to CSV Converter
Convert JSON arrays to CSV online. Nested objects are flattened with dot notation, quotes are escaped correctly, works with large files.