CSS color code example

Example 1: css background color

body {
  background-color: green;
}

Example 2: css color

/* all color are same */
color: rgb(255, 99, 71)
color: #ff6347
color: hsl(9, 100%, 64%)

Example 3: cout color

#define RESET   "\033[0m"
#define BLACK   "\033[30m"      /* Black */
#define RED     "\033[31m"      /* Red */
#define GREEN   "\033[32m"      /* Green */
#define YELLOW  "\033[33m"      /* Yellow */
#define BLUE    "\033[34m"      /* Blue */
#define MAGENTA "\033[35m"      /* Magenta */
#define CYAN    "\033[36m"      /* Cyan */
#define WHITE   "\033[37m"      /* White */
#define BOLDBLACK   "\033[1m\033[30m"      /* Bold Black */

Example 4: red css color codes

Following could be the CSS color codes which you can use in your CSS File

1. You can write simply "Red".
2. #FF0000
3. #F00
4. RGB(255, 0, 0)

Example 5: css light grey

#selector{
    color:lightgrey;
}

Example 6: text color css

.YourClass {
  color: #ff0000;
}

Tags:

Html Example