top of page

RGB

What is it?

  • RGB is a method of creating colors from the colors of red, green, and blue.

  • It is an additive color mixing model.

  • Allows creating colors by mixing red, green and blue light sources of various intensities. 

  • RGB for all digital or web-only content.

R = Red            G = Green          B = Blue

If you mix all three colors of light, you get white light.

Use

  • These are the following fields, where RGB is used.

Mobile

Projector

Monitors

(CRT, LCD, OLED)

USED IN

Digital camera

Scanner

On the web

  • TVs, screens, and projectors use RGB as their primary colors and then mix them together to create other colors.

Each pixel on the screen is built by three small and very close but still separated RGB light sources.

  • The color on the web.

  • Web sites that permit you to select colors to use on a Web page.

  • In HTML and CSS , web developers are using RGB to create a color.

Using Color Value

<h1 style="background-color:#ff6347;">...</h1>

#ff6347  (HEXA Value)

Red value

Green value

Blue

value

  • Hexa value should be 00 to FF.

  • #0000FF = Blue

  • #00FF00 = Green

  • #000000 = Black

  • #FFFFFF = White

  • Using RGB Value

  • RGB color values are supported in all browsers.

  • Formula specified with RGB (red, green, blue).

  • An integer between 0 and 255.

Example in CSS :

​

<style>

div {
    background-color : rgb (0, 191, 255);
    color : rgb (255, 255, 255);
}

</style>

How RGB works on Display?

  • Usually, RGB gadgets work with a technique called Pulse Width Modulation (PWM).

  • PWM controls :

  • The duty cycle: How long the light is on during each refresh.

  • The colored Which led is to be on, Red, Green or Blue LED.

I want yello​w

(Input)

Pulse With Modulation

(Controls duty cycle

and the colored LED )

ON            ON        OFF

  • Highlighted yellow means, Red, Yellow has a long duty cycle.

  • Shorter duty cycle means the specific color of LED is dimmer.

  • For black color, RGB LEDs are off.

  • All modern video cards, which are capable of 16M colors.

To emit white color, all RGB LED is to be on.

ON           ON          ON

bottom of page