Home / Blog / What Is RGB Color? Complete Beginner Guide

What Is RGB Color? Complete Beginner Guide

By Editorial Team | Dec 4, 2026

Learn what RGB color is, how red, green and blue channels mix on screens, and how to use rgb() values in your designs.

Every color you see on a phone, laptop or television starts with just three colors: red, green and blue. This system is called RGB, short for Red, Green, Blue. When you understand RGB, you understand how digital color works, and you can pick and adjust colors with more confidence in websites, apps and graphics.

RGB is the color model used by screens. It is different from paint or ink, where mixing colors makes them darker. On a screen, mixing light makes colors brighter. That simple difference explains why RGB behaves the way it does.

What Is RGB Color?

RGB is an additive color model. Additive means you start with darkness and add light to create color. A screen starts black when no light is shown. Add red light and you see red. Add green light and you see green. Add blue light and you see blue. Add all three at full strength and you see white.

Each tiny dot on a screen, called a pixel, contains red, green and blue sub-pixels. The screen controls how brightly each one glows. By changing those three brightness levels, it can show millions of colors. You do not see the separate sub-pixels from a normal distance. Your eyes blend them into one smooth color.

How the Three Channels Work: 0 to 255

In RGB, each channel has a value from 0 to 255. Zero means the light is off. The number 255 means the light is at full brightness. Any number in between gives a partial brightness. With 256 values for each channel, RGB can describe more than 16 million colors.

ColorRGB ValueMeaning
Blackrgb(0, 0, 0)All lights off
Whitergb(255, 255, 255)All lights at full brightness
Pure redrgb(255, 0, 0)Only red is on
Pure greenrgb(0, 255, 0)Only green is on
Pure bluergb(0, 0, 255)Only blue is on
Yellowrgb(255, 255, 0)Red and green together
Greyrgb(128, 128, 128)All channels equal

When all three channels have the same value, the result is a shade of grey. Low equal values give dark grey, high equal values give light grey. This is a useful check: if your grey looks blue or pink, one channel is higher than the others.

Mixing two channels at full strength gives secondary colors. Red and green make yellow. Red and blue make magenta. Green and blue make cyan.

How to Write RGB in CSS

In CSS, you write an RGB color with the rgb() function. List the red, green and blue values inside the brackets, separated by commas. The order always stays the same: red first, then green, then blue.

/* Pure blue text */
.heading {
  color: rgb(0, 0, 255);
}

/* A soft blue background */
.card {
  background-color: rgb(47, 123, 255);
}

/* Dark grey body text */
body {
  color: rgb(51, 51, 51);
}

You can also add transparency with rgba(). The fourth value, called alpha, runs from 0 for fully transparent to 1 for fully solid. For example, rgba(0, 0, 0, 0.5) is black at half opacity. This is useful for overlays and subtle backgrounds, because the color underneath still shows through.

When to Use RGB Instead of HEX

RGB and HEX describe the same colors in different ways. HEX is a shorter code that packs the same three values into six characters. For example, rgb(47, 123, 255) is written in HEX as #2F7BFF. The color is identical. Only the notation is different.

Choose RGB when you want to read or adjust the channels directly. It is easier to see that rgb(255, 100, 100) is a light red than to work that out from a HEX code. RGB is also better when you need transparency, because rgba() adds opacity in one step.

Choose HEX when you want a short value to copy into code or a style guide. You can learn more in our guide to what a HEX color code is, and convert between the two formats with our free HEX to RGB converter.

Practical Tips for Using RGB

Explore colors hands-on with the free online color picker on Front Design Tool. Pick a color, read its RGB values, adjust the channels, and copy the result into your CSS. Once you can read RGB values at a glance, choosing colors stops being guesswork.

More articles

Dec 4, 2026

How to Extract Colors From Any Image

Learn how to extract colors from any image, build a palette from them, and check contrast before you use them in a design.

Read More
Dec 4, 2026

How to Choose Brand Colors for Your Business

Learn how to choose brand colors that fit your audience, stand out from competitors, and stay consistent everywhere.

Read More
Dec 4, 2026

Pastel Colors: How to Create Soft Palettes for Websites

Learn what pastel colors are, how to create soft palettes for websites, and how to keep them readable with darker text and neutrals.

Read More