Web Colors.

Slides:



Advertisements
Similar presentations
© 2004, Robert K. Moniot Binary and Hex How to count like a computer.
Advertisements

Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Web Colors. Web Colors Using CSS Thus far, we have set our text and background colors using actual color names, such as:.example { background-color: gray;
4.01 HTML, CSS and Color. Introduction This presentation includes the following topics: Additive color theory Color Names RGB Colors Hex Colors.
Design, Formatting, CSS, & Colors 27 February, 2011.
Design, Formatting, CSS, & Colors September 9, 2010.
Review of HTML (adapted from Guthrie, , last updated January, 2007)
Computer Arithmetic: Binary, Octal and Hexadecimal Presented by Frank H. Osborne, Ph. D. © 2005 ID 2950 Technology and the Young Child.
Using color and fonts in HTML and XHTML Please use speaker notes for additional information!
Contains 16,777,216 Colors. My Car is red My Car is red How do I add colors to my web page? Notepad Browser Works with the “Standard” colors: Red, Green,
© Maths Support Service 2007 Binary and Hexadecimal Numbers Next Slide AE98FD AE98FD.
Primaries: magenta, yellow, and cyan This color system is called subtractive because: each primary color absorbs (subtracts) a certain part of the color.
Explanation of Web 6, Web 7 and Web 9 at my site Please be sure to bring up the speaker notes for the explanation Intro - Web 6, Web 7 and Web 9.
Real Numbers and the Decimal Number System
HTML Colors Color is one of the most important ideas of the Principles of Design. It is used to separate and emphasis elements in a design. Insert a picture.
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
INTRODUCTION TO HTML5 Styling Text. Change the Font Size  You can use the font-size property to change the font size for a document’s text.  Instead.
1 Working with Cascading Style Sheet (CSS) (contd.)  What we will cover… 1. Color (decimal and hexadecimal representation) 2. Floating elements 3. Styling.
CSW131 Steven Battilana 1 CSW 131 – Supplement 1 (X)HTML / CSS Not Covered or in Book Prepared by Prof. B. for use with Teach Yourself Visually Web Design.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
 A style sheet is a single page of formatting instructions that can control the appearance of many HTML pages at once.  If style sheets accomplished.
Most of the attributes of the body element specify colors for the Web page. Note: The background attribute won’t be useful till we learn about graphics.
Number Systems CIT Network Math
Web Colors. Web Colors: Up until now, we have been using only pre- defined color names, such as "orange" and "lightblue". As web designers, we need the.
Colors. Color of HTML Elements You can control the color of the following elements: You can control the color of the following elements: All text within.
 Komodo Edit Project › Helping you find your folder  Laptop › Delete what you don’t need › Keep class “doodles” in a single “sandbox” folder  Isis.
Hexadecimal Codes 1. RGB Color Wheel 2 Before we begin Hexadecimal is a number system Based on using 0 – F to represent 0 – 15 Hex is used to represent.
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.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
# Red Green Blue Digital Color RGB to HEX.
Web Colors and Fonts.
12/20/20151 Color Fall, 2010 Modified by Linda Kenney 10/26/10.
What do you think this lesson is all about? Write your answer on a sticky note.
Introduction To CSS. Lesson 1: History of CSS CSS was proposed in 1994 as a web styling language. To helps solve some of the problems HTML 4. There were.
CONFIGURING COLOR AND TEXT WITH CSS Chapter 3. Cascading Style Sheets (CSS) Used to configure text, color, and page layout. Launched in 1996 Developed.
Searching Binary and Hexadecimal numeral systems
Cascading Style Sheets
More CSS.
CSS Box Model.
CSS Box Model.
4.01 HTML, CSS and Color.
Hexadecimal Sweet Sixteen!.
Chapter 13 Colors & backgrounds.
4.01 Cascading Style Sheets
( Cascading style sheet )
CSS Rule Selector Declaration Block Value Attribute Name body {
From now on you are the Creator,
Programming the Web using XHTML and JavaScript
Cascading Style Sheets (Formatting)
4.01 HTML, CSS and Color.
By Brian MacMillan version all rights reserved.
FOREGROUND COLOR h1 { color: DarkCyan;} h2 { color: #ee4e80;} p { color: rgb(100, 100, 90);} The three traditional ways to specify colors: Color name.
Web Colors.
Colors.
Positioning.
CSS Box Model.
CSS Style Sheets: Intro
More CSS.
Cascading Style Sheets Color and Font Properties
Instructions for creating a template in MS Frontpage
Chapter 6 Introducing Cascading Style Sheets
CSS Box Model.
Positioning.
Web Colors.
Cascading Style Sheets
4.01 Cascading Style Sheets
4.01 HTML, CSS and Color.
Web Programming and Design
Presentation transcript:

Web Colors

Web Colors Using CSS Thus far, we have set our text and background colors using actual color names, such as: .example { background-color: gray; color: red; } In CSS 2.1, there are just 17 color names available. CSS3 expanded this number to 140, but even this amount of variety is insufficient to build a custom website. Let's see now how we can create our own precise colors, with the number of possible shades running into the millions.

RGB Colors To build custom colors, we mix specified amounts of the additive primary colors of red, green, and blue (often abbreviated as RGB). There are 256 available shades for each of red, green, and blue. That creates 256 X 256 X 256 = 16.7 million possible combinations!

RGB Hex Codes We specify the mixtures of red, green, and blue by using what is known as a Hex code: #12AF30 How much RED? How much GREEN? How much BLUE? A Hex code is always preceded by the pound sign (#) and always lists the colors in the order of red, then green, then blue.

Understanding Hex Codes For those who have never seen the hex (hexadecimal) format before, it can be confusing at first. In reality, it's fairly straightforward: Base 10 (Decimal System): Base 16 (Hexadecimal System): 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 A B C D E F Lowest Possible Digit Highest Possible Digit It's often helpful for newcomers to hexadecimal to translate the letters in their mind to Base 10 numbers. So A=10, B=11, C=12, D=13, E=14, and F=15.

Two Character Hex Codes For each color (red, green, blue), we have two hexadecimal characters (digits) to set a value. The first character represents how many 16s are in the number and the second character represents how many 1s: Hexadecimal: Decimal: 00 01 0A 0F 10 1F 2A 7D AA F1 FF 1 10 (zero 16s and ten 1s) 15 (zero 16s and fifteen 1s) 16 (one 16 and zero 1s) 31 (one 16 and fifteen 1s) 42 (two 16s and ten 1s) 125 (seven 16s and thirteen 1s) 170 (ten 16s and ten 1s) 241 (fifteen 16s and one 1) 255 (fifteen 16s and fifteen 1s) This two-character hexadecimal format allows for 16 X 16 = 256 possibilities, ranging from the lowest value of 00 to the highest value of FF. If we set the value of red to be 00, it would contribute no red at all. If we set it to be FF, it would contribute the maximum possible amount of red to the resulting color.

Example Hex Codes If hexadecimal is still a bit confusing, don't worry. When we start using real-life examples, it will begin to make more sense. Here are the actual hex codes for the 17 standard colors in CSS 2.1: As we study these hex codes, we can begin to see the logic of mixing lower and higher amounts of red, green, and blue to result in the given color. Hex codes can use uppercase or lowercase letters A through F, or even a mix between the two. As uppercase letters are more commonly used, we'll standardize on them in this course.

Finding Hex Codes Many applications and websites offer tools to help us find and select color codes. Colorpicker.com is a free website and very simple to use: Hex code displays here, ready to be copied and pasted. Slide the arrows up and down to browse the color spectrum. Click on any spot in the color picker area to produce the hex code for that specific shade.

Using Hex Codes in CSS Let's use the Hex code we just generated from the color picker website and set it as the background color for a <div> element. We'll set a different, contrasting color for the text: <style type="text/css"> .example { background-color: #365D75; color: #D08EB4; width: 250px; height: 200px; } </style> ... <div class="example"> <h2>Sample background and text colors.</h2> </div> Remember to start the Hex code with the pound sign. If this is omitted, CSS will completely ignore the color declaration.