01 / Example
Example
#2A7FDCrgb(42, 127, 220)Text & code / MULTIVERTO
Convert a #RGB or #RRGGBB color into three RGB channel values.
Apply each text tool to the previous result. Text workflows ↗
Only the recipe name and tool order are saved in this browser. Your input and results are never saved.
01 / Example
#2A7FDCrgb(42, 127, 220)02 / Guide
Convert a #RGB or #RRGGBB color into three RGB channel values. Use this direction when a design token or CSS rule gives a hex code but a graphics control asks for separate red, green and blue integers. The optional # is notation, not part of the numeric value. Three-digit shorthand is expanded before conversion, so #ABC means #AABBCC rather than three tiny channel values.
Each two-digit hex pair becomes one red, green or blue channel from 0 to 255; shorthand digits are doubled. For #2A7FDC, the pairs 2A, 7F and DC become 42, 127 and 220 in decimal. Enter only three or six hex digits; four- and eight-digit codes include alpha and are intentionally rejected here. The output is an rgb() expression ready for CSS or for reading individual channels.
When transferring a HEX swatch into three channel fields, read the pairs in red–green–blue order and preserve leading zeroes. This reading extracts three opaque color channels from a hex token; it cannot infer transparency that the token does not contain. HEX and RGB describe the same three additive light channels. Each channel has an integer value from zero to 255, and hexadecimal writes that value with two base-sixteen digits. A six-digit code therefore has red, green and blue pairs in that order. HSL is another way to describe an RGB color: hue identifies a position on the color wheel, saturation controls distance from a gray of the same lightness, and lightness places the color between black and white. These forms are useful for comparing design tokens, reading CSS and adjusting a palette without guessing what a code means.
A code such as #0010FF starts with a zero red channel; dropping the first pair would shift the meaning of every channel. The result can be pasted into an rgb() CSS declaration, but the output cannot tell you how a particular display profile renders it. If the original design token includes alpha, record that separately before this three-channel conversion. Comparing the source swatch and the RGB rendering is a useful visual check, especially after copying a code from a screenshot or specification.
For a concrete check, the example input #2A7FDC produces rgb(42, 127, 220). Check that the first pair becomes red, the middle pair green and the last pair blue. A leading zero is part of a channel rather than padding to discard. If a design token looks different after import, inspect channel order and whether the receiving program expects an alpha value. A reverse RGB-to-HEX conversion should reproduce the same six color digits when all channels were read as integers.
Explore guides