Literal colors are defined by your theme's color palette and are the lowest level color tokens in your theme. Each token is identified by a name, like red or gray, and a number based on the color's lightness. On this scale, 100 is equal to pure white and 0 is equal to pure black.
Surfaces are background layers that other content rests on. Surface colors help convey hierarchy through a sense of elevation, where --wa-color-surface-raised is the closest to the user (e.g., dialogs and popup menus) and --wa-color-surface-lowered is the farthest away (e.g., wells).
Web Awesome uses a single focus color for predictable keyboard navigation. This is used alongside other focus tokens to construct --wa-focus-ring. We recommend a minimum 3:1 contrast ratio against surface colors and background colors wherever possible.
Web Awesome leverages color-mix() to achieve consistent hover and active states across components without the need for untold numbers of handpicked colors. Through color-mix(), these custom properties contextually generate hover and active colors based on the color of the component.
Semantic colors reinforce a specific message, intended usage, or expected results through familiar, meaningful hues. Each color is identified by its semantic group, role, and attention using the format --wa-color-{group}-{role}-{attention}. There are five groups of semantic colors:
Brand to emphasize your brand color
Success for validity or confirmation
Neutral for ordinary or inactive content
Warning for caution or uncertainty
Danger for errors or risk
Each group defines colors for specific roles so that colors can be easily assembled with predictable results and readable contrast. There are three roles:
Fill for background colors or areas larger than a few pixels
Border for borders, dividers, and other stroke-width elements
On for content displayed on a fill (e.g., pair --wa-color-danger-on-loud with --wa-color-danger-fill-loud)
Finally, each color is named according to how much attention it draws. Here, we use noise as an analogy: a loud noise draws more attention than a quiet one. There are three levels of attention: