html69// dev utilities

CSS tool

RGB to HEX Converter / HEX to RGB Converter

An RGB to HEX converter that also turns HEX into RGB. Paste a color, drag the channels, and copy CSS. It all stays on your device.

Like the tool? Find a bug?Share with us

Converter

Paste rgb() or a hex color, or drag the channels. Conversion stays on your device.

Preview

#0ea5e9/rgb(14, 165, 233)

Red
Green
Blue
Alpha %
Supported files: .css
#0ea5e9
rgb(14, 165, 233)
color: #0ea5e9;
bg-[#0ea5e9] text-[#0ea5e9]

Guide

How this RGB to HEX converter works

01

RGB becomes HEX

rgb(14, 165, 233) is three channels from 0 to 255. HEX writes the same color as #0ea5e9. Sample is that sky. Alpha adds an eighth hex digit, or rgba().

02

HEX becomes RGB

#0ea5e9, short #0ea, and eight-digit HEX with alpha all parse. Switch HEX to RGB when the rest of the stylesheet uses functions.

03

Paste one color or a sheet

A single value updates the preview. A CSS block replaces every rgb() with HEX, or every HEX with rgb(), depending on direction. Copy CSS or Tailwind. Nothing leaves the browser.

Use it

What to copy

HEX is compact in a stylesheet. RGB is easier to tweak by channel. Tailwind wants an arbitrary value like bg-[#0ea5e9]. Rose, Lime, Ink, and White are starting points.

FAQ

Questions

RGB or HEX?

They describe the same color. HEX is shorter in CSS. RGB is clearer when you are mixing channels or adding alpha.

Can I paste a whole stylesheet?

Yes. RGB to HEX replaces rgb() and rgba(). HEX to RGB replaces # colors. The first color still drives the preview.

Is there a size limit?

Paste is capped at 50,000 characters so a huge dump cannot freeze the tab.

Is my color uploaded anywhere?

No. Preview, copy, and download run in this tab. There is no account and no API call.