Curriculum
Course: CSS
Login

Curriculum

CSS

CSS INTRODUCTION

0/1

CSS Selectors

0/1

CSS Comments

0/1

CSS Padding

0/1

CSS Box Model

0/1

CSS Combinators

0/1

CSS Pseudo-classes

0/1

CSS Pseudo-elements

0/1

CSS Dropdowns

0/1

CSS Image Gallery

0/1

CSS Image Sprites

0/1

CSS Counters

0/1

CSS Website Layout

0/1

CSS Specificity

0/1

CSS Math Functions

0/1
Text lesson

RGB

RGB Value

In CSS, a color can be defined using an RGB value, employing the formula:

rgb(red, greenblue)

Each parameter (red, green, and blue) determines the intensity of the color within a range of 0 to 255.

For instance, rgb(255, 0, 0) represents red because red is maximized at 255 while green and blue are set to 0.

To render black, all color parameters should be set to 0, as in: rgb(0, 0, 0).

To render white, all color parameters should be set to 255, as in: rgb(255, 255, 255).

Explore various color combinations by adjusting the RGB values below:

Image

Example

 

Image

Shades of gray are typically described by having equal intensities across all three light sources.

Example

Image

RGBA Value

RGBA color values expand upon RGB color values by incorporating an additional alpha channel, determining the opacity level for a color.

An RGBA color value is defined as:

rgba(red, greenblue, alpha)

The alpha parameter ranges from 0.0 (fully transparent) to 1.0 (completely opaque):

Explore various combinations of RGBA values to observe their effects.

Image

Example

Image