Background Color
Select Color
clearThe background-color property sets the background color of an element and it can only be used as a single <color> value.
CSS
Background Color Generator
This dynamic and free CSS generator empowers you to create custom CSS code for solid color backgrounds. Beyond solid colors, the generator offers precise control over transparency. You can adjust the opacity of the background color itself or control the transparency of the entire element using the opacity property. This allows you to create subtly shaded overlays or semi-transparent elements that blend with other parts of your web page. The generated CSS code is clean, efficient, and ready to be directly integrated into your HTML or CSS files. No coding experience is required to use this tool.
background-color
The background-color property sets the background color of an element and it can only be used as a single <color> value.
In CSS, the following color values are the most often used:
- Keyword Values:
- These are basic colors that have easy-to-remember names like
red,green,blue, etc. - These colors can have a keyword associated with them, such as
blueviolet,cornflowerblue,darkgreen, etc. There are about 150 colors with a keyword associated.
- These are basic colors that have easy-to-remember names like
- HEX Values:
- A hexadecimal color value represents colors using the most common syntax, a six-value syntax beginning with the # symbol like
#ff0000,#00ff00,#0000ff, etc. - It is a shorthand for the color model of the primary color components RGB (Red, Green, Blue), where each pair of digits indicates the intensity of red, green, and blue, respectively.
- A HEX value can be created using the three-value
#f01which is equivalent to#ff0011, four-value#f01cwhich is equivalent to#ff0011cc, six-value#ff0011, and eight-value syntax (#ff0011cc), using both uppercase and lowercase letters.
- A hexadecimal color value represents colors using the most common syntax, a six-value syntax beginning with the # symbol like
- RGB Values
- The
RGBvalue is a color model that represents three different channels. - The letters
RGBrepresentred,green, andblue, representing mixtures of colors. - With the
rgb()function, a color can be created using three values or numbers, generally between0.0and1.0, or between0and255. - Each value or number represents the primary colors that define the final color. For example, a black color would be
rgb(0, 0, 0), a white color would bergb(255, 255, 255), and a combination of colors would bergb(231, 204, 68) this creates a type of yellow color that defines the final color.
- The
Syntax
background-color: color;
