120 likes | 254 Vues
This lesson focuses on applying color in CSS, adapted from the University of Washington’s "Web Design & Development I" course materials. Students will learn two methods for expressing color in CSS: named colors and hexadecimal codes. By the end, students will be able to identify basic colors, implement color schemes, and set background and font colors for HTML elements on their websites. Emphasizing the importance of color, this lesson provides tools for creating visually appealing web designs.
E N D
Applying Color in CSS Web Design – Sec 4-5 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials
Objectives • The student will • be able to identify two methods for expressing color in CSS. • be able to identify a few basic colors, including black and white, by their hexadecimal codes • be able to implement a color scheme on a web site using CSS to define background and font colors for HTML elements.
Expressing Colors in CSS • Color Names:
There are now 140 named colors in HTML • http://www.html-color-names.com/color-chart.php
Expressing Colors in CSS • Hex Triplet: • Using color names is handy and easy to understand, but most computer screens today are capable of displaying over 16 million colors. • We identify them using a hex triplet. A hex triplet is a six-digit number, where each pair of digits represents (in order) the value of red, green, and blue.
Expressing Colors in CSS • Each pair of digits is a hexadecimal number (base 16), where 00 is the lowest value and FF is highest. • Here are some examples: • #FF0000 has the maximum amount of red, but no green or blue (result: red) • #800080 mixes a lot of red, no green, and a lot of blue (result: darkish purple) • #000000 has no color (result: black) • #FFFFFF has maximum amounts of all colors (result: white)
Rest of Today • You need to choose a color scheme for your web site. You need to set the following colors: • Use Color Scheme Designer to create a color scheme. • See the homework for additional instructions.
Other CSS Settings • Consider adding these settings to your CSS file: