Colors
Elastic UI builds with a color palette that is based on predefined 14-step scales for a core set of three colors (blue / teal / pink) as well as a green / yellow / red qualitative set and combined with a 28-step grayscale. Colors are defined to work well when combined for their semantic purpose.
When switching between light and dark color modes, the theme keys do not change, only their values do.
Brand colors
Elastic has two main brand colors. The other three are used for statefulness like indicating between successful and dangerous actions.
euiTheme.colors[brand]
token
Most usages of the colors can be implemented simply by pulling and applying the values.
Sample | Token | Value |
---|---|---|
colors.primary | Main brand color and used for most call to actions like buttons and links. | Value #0B64DD |
colors.accent | Pulls attention to key indicators like notifications or number of selections. | Value #BC1E70 |
colors.accentSecondary | Secondary attention indicator with lower priority. | Value #008B87 |
colors.success | Used for positive messages/graphics and additive actions. | Value #008A5E |
colors.warning | Used for warnings and actions that have potential to be destructive. | Value #FACB3D |
colors.danger | Used for negative messages/graphics like errors and destructive elements. | Value #C61E25 |
Text colors
Each brand color also has a corresponding text variant that should be used specifically when coloring text. As is used in
EuiTextColor.euiTheme.colors[colorText]
token
Remember, when using any of the EUI colors for text, use the text specific variant.
Sample | Token | Value |
---|---|---|
Aa colors.textParagraph | Value #1D2A3E | |
Aa colors.textHeading | Value #111C2C | |
Aa colors.textSubdued | Value #516381 | |
Aa colors.link | Value #1750BA | |
Aa colors.textPrimary | Value #1750BA | |
Aa colors.textAccent | Value #A11262 | |
Aa colors.textAccentSecondary | Value #047471 | |
Aa colors.textSuccess | Value #09724D | |
Aa colors.textWarning | Value #6A4906 | |
Aa colors.textDanger | Value #A71627 |
Background colors
Semantic background colors. These should be used according to their semantic purpose.
If a border is needed use the semantically related border color, e.g. backgroundBasePrimary
with borderBasePrimary
.
Sample | Token | Value |
---|---|---|
colors.backgroundBasePrimary | Value #E8F1FF | |
colors.backgroundBaseAccent | Value #FFEBF5 | |
colors.backgroundBaseAccentSecondary | Value #E2F9F7 | |
colors.backgroundBaseSuccess | Value #E2F8F0 | |
colors.backgroundBaseWarning | Value #FDF3D8 | |
colors.backgroundBaseDanger | Value #FFE8E5 | |
colors.backgroundBaseSubdued | Value #F6F9FC | |
colors.backgroundBasePlain |