Colors

Hex Codes

Color in HTML is normally described by a combination of 6 numbers and letters prefaced by a # called a hexidecimal code (hex code for short). For example, the hex code for white is #ffffff and the hex code for black is #000000. There are several web sites that will help you find hex codes for colors that you like.

You can specify colors on text, highlighting, borders, and background colors by adding a color element to the style on a tag. Make sure to always check that the color contrast ratio between text and background is high enough that it can be read by low vision and color-blind individuals. The standard is a 4.5:1 ratio. Tools such as the WebAim Color Contrast Checker can help you identify the contrast ratio in your color palette.

Examples:

style="color: #87A96B;"

style="background-color: #003366; color: #ffffff;" <-Note that if your background color is dark, your text needs to be white.

<div style="border: 5px double #21abcd; padding: 5px; margin: 10px; width: 300px;">
<div style="margin-left: 30px; padding: 10px; background-color: #fff0d8; width: 60%; text-align: center;">

 

If you want to use the official IU color palate, the hex codes are: ( Download downloadable pdf

)

colorpallateHEX.jpg