Convert any grayscale value to its RGB, HEX, and HSL equivalent instantly — no signup required.
How Grayscale Converts to RGB
A grayscale value converts to RGB by using the same number for the red, green, and blue channels — so a grayscale value of 128 becomes rgb(128, 128, 128). This works because grayscale has no color information, only brightness, and RGB represents color as three channels of red, green, and blue light. When all three channels carry an identical value, the result is a neutral gray with zero saturation.
If you’re starting from a percentage instead of a 0–255 number, multiply the percentage by 2.55 and round to the nearest whole number. For example, 50% gray becomes 50 × 2.55 = 127.5, which rounds to rgb(128, 128, 128). The same logic explains why grayscale converts cleanly to HSL: hue is always 0 and saturation is always 0%, with lightness matching the percentage directly — hsl(0, 0%, 50%).
When to Use a Grayscale to RGB Converter
- CSS development: Grayscale UI elements (borders, disabled states, placeholder text) are often specified as a single brightness value in design files, but CSS needs a valid
rgb()orhexvalue to render. - Design handoff: Design tools sometimes export grayscale swatches as a single luminance number; developers need the RGB/HEX equivalent to match it exactly in code.
- Image and print workflows: Grayscale percentages from image editing software need RGB conversion for web display or further color manipulation.
FAQ
What is the RGB value of a grayscale color?
A grayscale color’s RGB value repeats the same number across all three channels. A grayscale value of 100 becomes rgb(100, 100, 100), since red, green, and blue are equal whenever a color has no hue or saturation.
How do you convert grayscale percentage to RGB?
Multiply the grayscale percentage by 2.55 and round to the nearest whole number, then use that number for all three RGB channels. For example, 75% grayscale converts to 75 × 2.55 = 191.25, rounding to rgb(191, 191, 191).
What is the RGB value of black and white in grayscale?
Black in grayscale is 0, which converts to rgb(0, 0, 0). White in grayscale is 255 (or 100%), which converts to rgb(255, 255, 255). Every grayscale value between these two endpoints follows the same equal-channel pattern.
