You are here: Home / Topics / Compare RGB values with Hexadecimal color codes?

Compare RGB values with Hexadecimal color codes?

Filed under: CSS Interview Questions on 2022-07-02 15:22:29

A color can be specified in two ways:

  • A color is represented by 6 characters i.e. hexadecimal color coding. It is a combination of numbers and letters and is preceded by #. e.g.: g {color: #00cjfi}
  • A mixture of red, green and blue represents a color. The value of a color can also be specified.

e.g.: rgb(r,g,b):
In this type the values can be in between the integers 0 and 255. rgb(r%,g%,b%): red, green and blue percentage is shown.

About Author:
D
Dharmendra Sir     View Profile
Hi, I am using MCQ Buddy. I love to share content on this website.