T
ToolPrime

How to Convert RGB to HEX

ToolPrime Team 2 min read

When working with design tools that output RGB values, you often need to convert them to HEX codes for CSS. The conversion is straightforward: each RGB channel (0-255) becomes a two-digit hexadecimal number.

1 Open the Color Picker

Navigate to the Color Picker tool.

2 Enter RGB values

Type your R, G, and B values (0-255) into the RGB input fields.

3 Copy the HEX code

The HEX code updates automatically. Click copy to grab it.

How It Works

RGB to HEX conversion takes each decimal channel value (0-255) and converts it to a two-digit hexadecimal string. The three hex pairs are concatenated and prefixed with #. For example, rgb(59, 130, 246): 59 = 3B, 130 = 82, 246 = F6, giving #3B82F6.