In this table you’ll find all colors that have an HTML name and a code. A Table of 140 HTML colors with names and codes (string, HEX, rgb) For example, green would look like this: rgb (0, 255, 0) Īll of these values are suitable for other situations where color is needed, for example, in background-color. Only the intensity is set here by numbers 0 from 255, where 0 is the lowest intensity, 255 is the highest. In the RGB palette, the color is mixed in a similar way by mixing the intensity of red, green, and blue colors.
Then for green, the HEX code will be: #00FF00 RGB palette of HTML colors To get the red color, you need to set the maximum value for the byte responsible for the red color, and for the rest - the minimum: #FF0000. So it’s the same as in the drawing class - to get any color you just need to mix red, blue, and green. To obtain black, the intensity of all colors should be minimal: #000000. For example, to get white, you need to “mix” three primary colors with maximum intensity: #FFFFFF. The value 00 is the lowest intensity, FF is the highest. Each byte is responsible for the intensity of one of the three primary colors: the first is responsible for the intensity of red, the second for green, and the third for blue: The HEX code always starts with a # followed by a 3-byte hexadecimal number (6 digits in total). If you need a color that is not represented there, you will need to use a hexadecimal format (HEX code) or RGB. The standard set of HTML colors consists of 140 different values. The only limitation is that we have to choose a color from several predefined options. The name of the color is relatively simple. by color code in the RGB palette: from rgb (0, 0, 0) to rgb(255, 255, 255).by hexadecimal number: from #000000 to #ffffff.by color name, for example, red, green, blue.The value for the color property can be set in three main ways: But it's a great way to pick some basic colors nice and quickly.Using an RGB or HEX color code in HTML you can change the color of the text, background, url, font, table or the whole page. With current day monitors being able to display millions of colors, there's little need to use the web safe colors any more. Click on a color to display it in a new page. This chart displays the 216 "web safe" colors. Here's a list of color-related properties you can use with CSS. Here's a list of color values you can use with CSS.
Here's an example of adding transparency to a color using the rgba() function. This means that you can add a color that's semi-transparent - so that you can see the element behind it. Transparent ColorsĬSS also enables us to add transparent colors to our HTML elements. The chart below shows the hexadecimal color codes for shades of blue, teal, cyan. You can also move the styles to an external style sheet so that you can apply the styles across the whole site from one file. The Hex Hub Warms: red orange brown yellow yellowgreen.
This is a basic example to demonstrate how colors can be applied to a web page using CSS. To set a border color, use border-color.īelow are quick CSS code examples for applying this color to various HTML elements.To set a background color, use background-color.You can apply any of these colors to a website or blog by using the relevant CSS code. It doesn't matter which one you choose as long as it's a valid color. For example blue can also be represented as #0000ff, #00f, rgb(0,0,255) and many other ways.
More Color Charts How to use these ColorsĮach color can be represented in many different ways.