DNSfinder.net
RGB Converter

RGB Color Converter

Enter a red, green and blue value from 0 to 255 and get the same colour as HEX, HSL, HSV and CMYK, each ready to copy. The page previews the colour, measures its contrast against white and black with the WCAG formula, and builds five tints, five shades and a complementary colour from it. It suits front-end developers and designers moving a colour between code and design tools, and it runs entirely in the browser.

Loading RGB Color Converter...

Querying live edge resolvers and network infrastructure...

How to use the RGB Color Converter

  1. Type three numbers such as 30, 111, 217, or paste rgb(30, 111, 217), into the RGB color field. The preview updates as you type.
  2. Or click the square swatch beside the field and choose a colour with your browser's picker.
  3. Click Copy next to HEX, HSL, HSV / HSB or CMYK in the All formats list.
  4. Read the two contrast ratios, then click a tint or shade to load it and compare.

What to look for

Equal channels mean grey

When the three numbers match, the colour has no hue: 0, 0, 0 is black, 255, 255, 255 is white and everything between is neutral grey. The HSL and HSV rows then report 0 for hue and saturation, and the CMYK row shows black ink only.

Green carries the brightness

The contrast figures weight the channels unequally because the eye is most sensitive to green. Pure green 0, 255, 0 manages only 1.37:1 against white, while pure blue 0, 0, 255 reaches 8.59:1. Two colours with the same channel total can differ widely in legibility.

Other formats are rounded

HEX is an exact rewrite of the three channels. HSL, HSV and CMYK are calculated and rounded, hue to a whole degree and percentages to one decimal place, so converting one of them back can move a channel by a step or two. Keep RGB or HEX as the master value.

Guide

How RGB values describe colour on a screen

How a screen builds colour from three lights

Every pixel on a display is three small light sources, one red, one green and one blue, and the RGB triplet sets how hard each is driven. Because light adds, all three at full strength give white and all three off give black. Paint and ink work the other way round: the more you mix, the darker the result.

Pairs of channels make the secondary colours. Red and green at full strength, 255, 255, 0, give yellow; green and blue give cyan; red and blue give magenta. Lower all three in proportion and the colour darkens without changing hue, which is what the Shades strip does when it mixes your colour towards black in five even steps.

What the numbers from 0 to 255 mean

Each channel is stored in one byte, so it has 256 levels, and three channels give 16,777,216 colours. A value is a position on that scale, not a physical amount of light. sRGB, the default colour space of the web, bends the scale so that more of the levels fall in the dark tones, where the eye picks up small differences.

One consequence is that 128, 128, 128 looks like a middle grey yet emits only about 22 percent of the light of white. It takes 188, 188, 188 to reach half. The Contrast card calculates on that linear light, so for the 128 grey it reports 3.95:1 against white and 5.32:1 against black.

What you can type into the field

The field takes three numbers from 0 to 255 separated by commas or spaces, with or without the rgb() wrapper, so 30, 111, 217 and rgb(30 111 217) are read the same way. Decimals are accepted and rounded in the output. A number above 255 turns the field red with the message Couldn't read that colour, and the panels keep showing the last valid colour.

Two CSS forms are only partly understood. An rgba() value, or a modern rgb() with a slash and an alpha, is read for its first three numbers and the opacity is dropped. Percentages are not converted: rgb(50%, 50%, 50%) is taken as 50, 50, 50. The field also accepts a HEX code starting with #, and hsl(), hsv() or cmyk() notation.

Reading the format list and the contrast card

All formats lists RGB first, then HEX, HSL, HSV / HSB and CMYK, each with its own Copy button. HEX is the same three bytes written in base 16. HSL and HSV describe the colour by hue angle, saturation and lightness or value. CMYK is an arithmetic estimate with no ink or paper profile behind it, as the CMYK Color Converter explains.

The Contrast card sets a sample Aa in your colour on white and on black and gives each a ratio and a grade: AAA, AA, AA Large or Fail. WCAG AA asks for 4.5:1 for normal text and 3:1 for large text, and AAA asks for 7:1. Only white and black backgrounds are tested, so a coloured background needs a separate check.

Underneath, Tints mixes the colour with white and Shades with black, five steps each. Clicking a step loads it into the field. Complementary is the colour you get by subtracting every channel from 255. For 30, 111, 217 that is #E19026, an orange from the opposite side of the hue wheel.

Limits of an RGB value

An RGB triplet is an instruction to a device, and devices differ. The same numbers look cooler, warmer or more saturated from one panel to the next unless the screen is calibrated and the software manages colour. Wide-gamut displays can show colours that no sRGB triplet describes. This converter works in sRGB only and cannot express them.

It also handles one opaque colour at a time, with no alpha channel and no named CSS colours such as tomato. If your starting point is a code from a stylesheet, the HEX Color Converter takes that notation directly, and the HSV Color Converter takes values from a design tool's picker. Nothing you enter leaves your browser.

Knowledge Base & FAQ

RGB Color Converter FAQs

Common questions about the rgb color converter.

Write each channel as a two-digit hexadecimal number and join the three after a #. 30 is 1E, 111 is 6F and 217 is D9, so rgb(30, 111, 217) becomes #1E6FD9. Type the numbers above and the HEX row shows the code with a Copy button beside it.