Colors are a great way to add style to webpages. Look at the different color options for CSS and choose a color palette for your projects.
- [Instructor] So far, we've been using the color property with keyword values but there are also other types of color values. Hex codes always start with a number sign followed by six characters, a combination of the letters A to F and the numbers from zero to nine to define the colors. RGB stands for red, green, and blue and each number represents a value on a scale between zero and 255. These three value types can all represent the same color, though with RGB or hex codes, there are more colors to choose from.
You can find these values in image editing software like Photoshop. There are also many online tools, let's take a look at a few resources. One of my favorite resources is colors with a you .neilorangepeel.com. I like this resource because it lists all of the available keywords as well as the corresponding hex codes and RGB values. Coolors.co is another useful resource because it also generates color pallettes. Select Start the Generator to open the tool.
It'll take a moment to load and once it does you can also select the spacebar to generate a new pallette. Hover over the color bar for more options. Accessibility is also something that should always be considered, here is another resource specifically focused on color combinations that provide contrast between a background color and the text. In the final project, we'll be using four different colors to add a background color to the various sections of the page and for the links.
This is my color pallette. If you'd like to follow along with the upcoming examples, take a moment to pick a color pallette of your own or just follow along with these colors.
- Creating a CSS file
- Writing basic selectors
- Setting properties
- Using different typefaces and web-safe fonts
- Understanding cascading and inheritance
- Setting a font family, font size, text color, and more
- Understanding the box model
- Using the float property