diff --git a/src-docs/src/views/guidelines/colors.js b/src-docs/src/views/guidelines/colors.js index ca162a3ee99b..619d5c861793 100644 --- a/src-docs/src/views/guidelines/colors.js +++ b/src-docs/src/views/guidelines/colors.js @@ -45,6 +45,19 @@ const allowedColors = [ 'euiColorAccent', ] +const visColors = [ + 'euiColorVis0', + 'euiColorVis1', + 'euiColorVis2', + 'euiColorVis3', + 'euiColorVis4', + 'euiColorVis5', + 'euiColorVis6', + 'euiColorVis7', + 'euiColorVis8', + 'euiColorVis9', +] + const ratingAAA = AAA; const ratingAA = AA; @@ -56,11 +69,12 @@ function renderPaletteColor(color, index) {
-

{color}

- -

RGB {lightColors[color].r}, {lightColors[color].g}, {lightColors[color].b}

- -

HEX {rgbToHex(lightColors[color].rgba).toUpperCase()}

+ + {color} + + RGB {lightColors[color].r}, {lightColors[color].g}, {lightColors[color].b}
+ HEX {rgbToHex(lightColors[color].rgba).toUpperCase()} +
); @@ -68,7 +82,11 @@ function renderPaletteColor(color, index) { export default() => ( + + + +

Core palette

Elastic UI builds with a very limited palette. We use a core set of three colors, combined with a green / orange / red qualitative set of three, and finally combine @@ -77,8 +95,7 @@ export default() => (

- - + {allowedColors.map(function(color, index) { @@ -86,6 +103,25 @@ export default() => ( })} + + + +

Qualitative visualization palette

+

+ The following colors are color-blind safe and should be used in + qualitative visualizations. +

+
+ + + + + + {visColors.map(function(color, index) { + return renderPaletteColor(color, index); + })} + + @@ -115,7 +151,7 @@ export default() => ( - +
{allowedColors.map(function(color, index) { @@ -155,7 +191,7 @@ export default() => ( } return ( - +