~/color-picker

RGB to Hex color converter

Convert an RGB color (rgb(255, 136, 0)) to its hex equivalent (#ff8800). The reverse-direction math, worked examples, and a live tool.

# conversion

formatforegroundbackground
rgb rgb(255, 136, 0) rgb(0, 0, 0)
hex #ff8800 #000000
hsl hsl(32, 100%, 50%) hsl(0, 0%, 0%)

# context

RGB is explicit and CSS-friendly; hex is shorter and lives in design files. Converting back is base-10 → base-16 per channel, zero-padded to two digits, concatenated with a leading #.

→ Open in color picker (pre-filled)

# notes

# other conversions