Repository navigation
2021 05 26 IT Pro Presentations
- Landmarks, Headings and Title
- Color Contrast
- Disclosure Menu
- Bypass Blocks
Using the color palette specified at Color | Design | Brand | Office of Strategic Marketing and Branding | University of Illinois Urbana-Champaign.
Primary Colors
- Illini Blue: #13294b
- Illini Orange: #ff552e
Secondary Colors
- Industrial Blue - 2 shades: #1d58a7, #cad9ef
- Cloud (Gray) - 2 shades: #e8e9eb, #dddede
Text Colors
- #00132c (on light background)
- #ffffff (on dark background)
- Applies to inline SVG images
- The
currentColorCSS value is specified onstrokeorfillattribute
Under certain conditions (relatively simple SVG graphic with only a few colors — mainly foreground and background; the image is something users interact with), using currentColor can be advantageous.
In our case, the search button icon and the chevron images in menu buttons meet these requirements.
The SVG search button icon (magnifying glass) is specified as the content of the button element, and its colors are:
color: $whitebackground-color: $illini-blue
The relevant parts of the search icon SVG:
<svg ...>
<title>Search</title>
...
<circle stroke="currentColor" ...></circle>
<rect fill="currentColor" ...></rect>
...
</svg>
The currentColor value means that the foreground color is inherited from color value of its closest ancestor (e.g. parent element).
The background color is unspecified, effectively making it transparent so that it picks up the color of its parent.
For this image, when high contrast mode is used and a color scheme is chosen that inverts the colors on the page, the background color will appear to change as it would with any type of image with a transparent background (e.g. PNG).
However, because the foreground color for these images is specified as currentColor, it will inherit the new foreground color of the HCM scheme (unlike its PNG counterpart).