Toollit

HEX ↔ RGB Converter

Convert HEX to RGB and RGB to HEX bidirectionally.

HEX and RGB

HEX and RGB essentially represent the same color information in different notations. HEX code #3b82f6 is rgb(59, 130, 246) in RGB. HEX uses hexadecimal (0-F), RGB uses decimal (0-255) to represent red, green, and blue channel values.

Both formats can be used in CSS. HEX is short and concise, often used for design tokens and variables. RGB can be extended with rgba() format including transparency, useful for overlays and shadow colors.

HEX Format

#RRGGBB 6 hex digits. Shorthand #RGB 3 digits also supported

RGB Format

rgb(R, G, B) Each channel 0-255. Use rgba() for transparency