Here are some sample hex codes of nice colors (including our green).
CSS COLOR CODES VS NAMES CODE
This is the hex code for your selected color. Hence any of these colors may be used in your HTML font color codes. Any of these color names can be used to define colors in HTML, CSS and/or Javascript. Yellow, fuchsia, maroon, and skyblue are just a few examples. Well, for your convenience, Ive constructed an interactive color chart below displaying all of the official color names in the so-called X11 color list that can be used in web page code. There are many available online, such as this one: īy using a color picker tool, you'll often immediately see a set of characters starting with #. HTML color names: There are 140 color names supported in CSS. You can click on a color rectangle to import the color into the HSL Color Picker.RGB, HEX or HSL values can be used as HTML color code or CSS color code. Each line consists of RGB values, HEX value, the colors name, luminance value, HSL values and a color rectangle. The similarity of colors can be determined by the name or using special formula to calculate distance between different named colors. This color chart represents a set of common colors ordered by name as an one-page overview. Hex codes are really easy to find by using a color picker tool. Here are the different color shades of Maroon (HTML/CSS). The good news is you don't really need to think about how the code are set. A hex code is a 6-digit string of numbers and letters that represents the red, green, and blue values of a color in hexadecimal format. Whoa! Sounds complicated.
Hex codes are my favorite way to set color in CSS. Using the above green as an example, here's a bad color combination (the text is hard to read!):īear this in mind as you set colors in CSS! HEX codes Using a high-contrast combination helps readability: This means choosing sufficiently high contrast color combinations so that even people who can't see well can still tell letters and content apart from each other on your page. One quick note before we jump into ways of setting color: make sure to use color schemes that are easily readable. In order to change text colors, you will need two things: 1.
CSS COLOR CODES VS NAMES HOW TO
Here's the green we'll be working with as an example to explore each way of expressing color! Our example green Accessibility Cascading Style Sheets (CSS) is the preferred method of changing text color, so first we will show the (archival) method of changing text color using inline HTML color codes, then we will move on to how to achieve the same effect using CSS. We'll check out the following ways to set color: Whichever way you choose to set colors, be consistent.
Color values can be set in CSS in several ways.