Design

Color

Mineral UI color provides themes built on inspiring hues and grounded in usable grays. Mineral UI is committed to providing an easy path to creating accessible palettes and themes.

Guidelines #

Color is used to establish focal points or highlight important information. Mineral UI uses color as a tool for communication and secondarily as decoration. Overuse of color will overload the viewer and undermine any effect it had in creating a visual hierarchy.

Take care when overriding individual theme values, since they enable consistent styling through automatic application of tone and shadowing.

Themes #

A theme is composed of a hue color ramp and the base gray ramp. Every theme uses the base gray ramp.

You can create your own theme:

  • <value>_60 represents the base color for the theme.
  • Hue ramps are generated from 10 points placed on a Bezier curve with 3 anchors.
  • The top point represents <value>_10.
  • The middle point represents <value>_60. This value should have a contrast ratio against white of at least AA.
  • The final point represents <value>_100.
  • Each value is evenly distributed. Some manual adjustment might be necessary.
  • Depending on the mood and tone for the theme, some curves are steeper and some more shallow. The theme will appear brighter and more saturated with shallower curves.

color swatch

Variants #

Variants are used in Mineral UI to aid users' understanding of the status of different callouts, actions, buttons etc.

The color system features three variants to represent intention:

  • Success: confirming actions or messages that were successful, or will begin a successful action.
  • Warning: actions or messages that indicate a warning or may produce an undesirable result.
  • Destructive: actions or messages that indicate errors or potential to destroy/remove data.

Accessibility #

Always consider customers who have different accessibility (a11y) needs, e.g. those who are color blind or visually impaired, when choosing colors. Color ramp values have similar accessibility values even when themes are switched out.

Most themes are WCAG AA+ accessible. If a higher level of accessibility is required, allow the user to activate an accessible theme as a user preference.

AA has a contrast level of 4.5:1 or higher, and AAA has a contrast of at least 7:1. AA Large means the font size must be at least 18 points or 14 points bolded to be AA accessible.

Ramps #

You can choose one of these ramps to create a theme. The default Mineral UI theme is built from "blue".

The name of the hue in the Mineral UI theme.

The CSS Hue, Saturation & Lightness value. Hue is set by the wavelength of light, saturation is how gray the color is, and lightness is the light/dark value.

blue_60hsl(217, 69%, 52%)
AAAA Large
1234

The a11y rating of white on top of this color. AA and AAA denote the minimum contrast ratio.

The a11y rating of black on top of this color

  1. <theme>_<value> The name of the hue in the Mineral UI theme.
  2. White Accessibility Rating The a11y rating of white on top of this color. AA and AAA denote the minimum contrast ratio.
  3. Black Accessibility Rating The a11y rating of black on top of this color
  4. hsl(H, S%, L%) The CSS Hue, Saturation & Lightness value. Hue is set by the wavelength of light, saturation is how gray the color is, and lightness is the light/dark value.
red_10hsl(0, 50%, 96%)
 AAA
red_20hsl(0, 79%, 91%)
 AAA
red_30hsl(0, 87%, 85%)
 AAA
red_40hsl(0, 92%, 77%)
 AAA
red_50hsl(0, 89%, 64%)
AA LargeAA
red_60hsl(0, 78%, 49%)
AAAA Large
red_70hsl(0, 87%, 39%)
AA 
red_80hsl(0, 82%, 31%)
AAA 
red_90hsl(0, 67%, 24%)
AAA 
red_100hsl(0, 50%, 18%)
AAA 
magenta_10hsl(336, 50%, 96%)
 AAA
magenta_20hsl(335, 79%, 91%)
 AAA
magenta_30hsl(335, 88%, 84%)
 AAA
magenta_40hsl(335, 87%, 76%)
 AAA
magenta_50hsl(335, 81%, 63%)
AA LargeAA
magenta_60hsl(335, 71%, 49%)
AAAA Large
magenta_70hsl(335, 81%, 38%)
AA 
magenta_80hsl(335, 77%, 31%)
AAA 
magenta_90hsl(335, 64%, 23%)
AAA 
magenta_100hsl(336, 52%, 17%)
AAA 
purple_10hsl(270, 50%, 96%)
 AAA
purple_20hsl(271, 77%, 92%)
 AAA
purple_30hsl(271, 79%, 85%)
 AAA
purple_40hsl(270, 77%, 78%)
 AAA
purple_50hsl(270, 72%, 68%)
AA LargeAA
purple_60hsl(270, 61%, 59%)
AAAA Large
purple_70hsl(270, 52%, 49%)
AA 
purple_80hsl(270, 57%, 39%)
AAA 
purple_90hsl(270, 56%, 29%)
AAA 
purple_100hsl(270, 49%, 22%)
AAA 
indigo_10hsl(240, 63%, 97%)
 AAA
indigo_20hsl(240, 84%, 93%)
 AAA
indigo_30hsl(240, 91%, 87%)
 AAA
indigo_40hsl(240, 89%, 82%)
 AAA
indigo_50hsl(240, 81%, 74%)
AA LargeAA
indigo_60hsl(240, 72%, 65%)
AAAA Large
indigo_70hsl(240, 59%, 56%)
AA 
indigo_80hsl(240, 53%, 46%)
AAA 
indigo_90hsl(240, 55%, 35%)
AAA 
indigo_100hsl(240, 46%, 23%)
AAA 
blue_10hsl(215, 67%, 96%)
 AAA
blue_20hsl(217, 88%, 90%)
 AAA
blue_30hsl(217, 93%, 83%)
 AAA
blue_40hsl(217, 92%, 75%)
 AAA
blue_50hsl(217, 84%, 64%)
AA LargeAA
blue_60hsl(217, 69%, 52%)
AAAA Large
blue_70hsl(217, 74%, 43%)
AA 
blue_80hsl(217, 80%, 33%)
AAA 
blue_90hsl(217, 75%, 25%)
AAA 
blue_100hsl(218, 48%, 16%)
AAA 
sky_10hsl(200, 64%, 95%)
 AAA
sky_20hsl(200, 86%, 86%)
 AAA
sky_30hsl(200, 87%, 76%)
 AAA
sky_40hsl(200, 81%, 63%)
 AAA
sky_50hsl(200, 73%, 49%)
AA LargeAA
sky_60hsl(200, 87%, 37%)
AAAA Large
sky_70hsl(200, 92%, 30%)
AA 
sky_80hsl(200, 90%, 23%)
AAA 
sky_90hsl(201, 80%, 18%)
AAA 
sky_100hsl(200, 65%, 13%)
AAA 
teal_10hsl(177, 54%, 93%)
 AAA
teal_20hsl(177, 66%, 79%)
 AAA
teal_30hsl(176, 59%, 64%)
 AAA
teal_40hsl(176, 49%, 51%)
 AAA
teal_50hsl(176, 60%, 39%)
AA LargeAA
teal_60hsl(176, 70%, 30%)
AAAA Large
teal_70hsl(176, 72%, 24%)
AA 
teal_80hsl(176, 73%, 19%)
AAA 
teal_90hsl(176, 69%, 14%)
AAA 
teal_100hsl(176, 65%, 10%)
AAA 
green_10hsl(144, 71%, 93%)
 AAA
green_20hsl(144, 65%, 80%)
 AAA
green_30hsl(144, 57%, 67%)
 AAA
green_40hsl(144, 47%, 55%)
 AAA
green_50hsl(144, 46%, 43%)
AA LargeAA
green_60hsl(144, 52%, 34%)
AAAA Large
green_70hsl(144, 53%, 27%)
AA 
green_80hsl(144, 52%, 21%)
AAA 
green_90hsl(144, 49%, 16%)
AAA 
green_100hsl(143, 43%, 12%)
AAA 
bronze_10hsl(33, 79%, 95%)
 AAA
bronze_20hsl(33, 88%, 83%)
 AAA
bronze_30hsl(33, 86%, 71%)
 AAA
bronze_40hsl(33, 79%, 58%)
 AAA
bronze_50hsl(33, 85%, 44%)
AA LargeAA
bronze_60hsl(33, 100%, 34%)
AAAA Large
bronze_70hsl(33, 96%, 28%)
AA 
bronze_80hsl(33, 87%, 22%)
AAA 
bronze_90hsl(33, 75%, 17%)
AAA 
bronze_100hsl(32, 62%, 12%)
AAA 
slate_10hsl(198, 38%, 95%)
 AAA
slate_20hsl(206, 68%, 88%)
 AAA
slate_30hsl(206, 63%, 79%)
 AAA
slate_40hsl(205, 55%, 69%)
 AAA
slate_50hsl(205, 42%, 55%)
AA LargeAA
slate_60hsl(205, 37%, 45%)
AAAA Large
slate_70hsl(205, 40%, 36%)
AA 
slate_80hsl(204, 38%, 28%)
AAA 
slate_90hsl(204, 33%, 21%)
AAA 
slate_100hsl(205, 25%, 15%)
AAA 
dusk_10hsl(264, 24%, 96%)
 AAA
dusk_20hsl(256, 63%, 92%)
 AAA
dusk_30hsl(256, 61%, 85%)
 AAA
dusk_40hsl(255, 52%, 77%)
 AAA
dusk_50hsl(255, 43%, 67%)
AA LargeAA
dusk_60hsl(254, 33%, 55%)
AAAA Large
dusk_70hsl(255, 29%, 46%)
AA 
dusk_80hsl(255, 30%, 36%)
AAA 
dusk_90hsl(255, 26%, 26%)
AAA 
dusk_100hsl(253, 20%, 18%)
AAA 
gray_10hsl(216, 33%, 97%)
 AAA
gray_20hsl(216, 33%, 94%)
 AAA
gray_30hsl(218, 31%, 90%)
 AAA
gray_40hsl(218, 28%, 83%)
 AAA
gray_50hsl(217, 22%, 74%)
 AAA
gray_60hsl(217, 15%, 61%)
 AA
gray_70hsl(217, 10%, 49%)
AA LargeAA Large
gray_80hsl(218, 11%, 39%)
AA 
gray_90hsl(215, 11%, 30%)
AAA 
gray_100hsl(217, 11%, 23%)
AAA 
blackhsl(223, 11%, 13%)
AAA