Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
5daa3d5
feat(common): add textInk and textGhost tokens
weronikaolejniczak Feb 12, 2026
9bef391
feat(borealis): add textInk and textGhost tokens
weronikaolejniczak Feb 12, 2026
26254b6
feat(common): remove ghost and ink tokens
weronikaolejniczak Feb 12, 2026
7955fb0
feat(borealis): remove ghost and ink tokens
weronikaolejniczak Feb 12, 2026
e058a61
feat(eui): replace ghost and ink token usages
weronikaolejniczak Feb 12, 2026
0509b65
feat(website): update documentation around ink and ghost tokens
weronikaolejniczak Feb 12, 2026
1413552
feat(borealis): add textInk and textGhost HCM overrides
weronikaolejniczak Feb 12, 2026
670265d
chore(borealis): add changelog
weronikaolejniczak Feb 12, 2026
2f9edd1
chore(common): add changelog
weronikaolejniczak Feb 12, 2026
1c00d97
chore(borealis): update comment
weronikaolejniczak Feb 12, 2026
9a30969
chore(common): update comment
weronikaolejniczak Feb 12, 2026
c5ca2bc
Update packages/website/docs/getting-started/theming/tokens/colors/sp…
weronikaolejniczak Feb 13, 2026
86f5e1d
feat(borealis): add euiColorTextGhost and euiColorTextInk JSON tokens
weronikaolejniczak Feb 13, 2026
61074c5
chore(borealis): update changelog
weronikaolejniczak Feb 13, 2026
4a9d892
chore(borealis): add new token types
weronikaolejniczak Feb 13, 2026
0522786
chore(website): update example css
weronikaolejniczak Feb 13, 2026
a0ca2b5
Revert "chore(borealis): update changelog"
weronikaolejniczak Feb 13, 2026
3171c50
chore(website): use deprecated special token
weronikaolejniczak Feb 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/eui-theme-borealis/changelogs/upcoming/9379.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Added `textInk` and `textGhost` color tokens for text and icon colors that should always remain dark or light regardless of color mode.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ I just realized that this PR had the skip-changelog-eui label. I missed that in the review 🫠

We should add a changelog for this on eui as well as the tokens are consumed through the theme from eui.
I added a PR for it here.


**Breaking changes**

- Removed `ink` and `ghost` theme tokens. Use `textInk` / `textGhost` for text and icon colors or `plainDark` /`plainLight` for non-text use cases.
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,6 @@
"euiColorSeverityDanger": "#EE4C48",
"euiColorChartLines": "#7186A8",
"euiColorChartBand": "#243147",
"euiColorGhost": "#FFFFFF",
"euiColorInk": "#000000",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: We'll need to add the new tokens textInk and textGhost as JSON tokens euiColorTextInk and euiColorTextGhost since we still support the usage of those.

If I see it correctly, then these should use the text JSON tokens?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I treated the JSON in a similar way like Sass but you are absolutely right we should add them here. I will go through the Kibana usage again and correct as needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as additional context: JSON tokens used to be mapped from Sass and the original intention was to remove them as well but while rolling out Borealis we noticed that we need to support them for static use cases where the react theme is not available 🫠

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"euiColorPrimary": "#61A2FF",
"euiColorAccent": "#EE72A6",
"euiColorAccentSecondary": "#16C5C0",
Expand Down Expand Up @@ -397,6 +395,8 @@
"euiColorTextSubdued": "#98A8C3",
"euiColorTextDisabled": "#6A7FA0",
"euiColorTextInverse": "#07101F",
"euiColorTextGhost": "#FFFFFF",
Comment thread
mgadewoll marked this conversation as resolved.
"euiColorTextInk": "#07101F",
"euiColorBackgroundBasePrimary": "#0A2342",
"euiColorBackgroundBaseAccent": "#351725",
"euiColorBackgroundBaseAccentSecondary": "#03282B",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,6 @@ declare module '@elastic/eui-theme-borealis/lib/eui_theme_borealis_dark.json' {
euiColorSeverityDanger: string;
euiColorChartLines: string;
euiColorChartBand: string;
euiColorGhost: string;
euiColorInk: string;
euiColorPrimary: string;
euiColorAccent: string;
euiColorAccentSecondary: string;
Expand Down Expand Up @@ -398,6 +396,8 @@ declare module '@elastic/eui-theme-borealis/lib/eui_theme_borealis_dark.json' {
euiColorTextSubdued: string;
euiColorTextDisabled: string;
euiColorTextInverse: string;
euiColorTextGhost: string;
euiColorTextInk: string;
euiColorBackgroundBasePrimary: string;
euiColorBackgroundBaseAccent: string;
euiColorBackgroundBaseAccentSecondary: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,6 @@
"euiColorSeverityDanger": "#EE4C48",
"euiColorChartLines": "#CAD3E2",
"euiColorChartBand": "#F6F9FC",
"euiColorGhost": "#FFFFFF",
"euiColorInk": "#000000",
"euiColorPrimary": "#0B64DD",
"euiColorAccent": "#BC1E70",
"euiColorAccentSecondary": "#008B87",
Expand Down Expand Up @@ -397,6 +395,8 @@
"euiColorTextSubdued": "#516381",
"euiColorTextDisabled": "#798EAF",
"euiColorTextInverse": "#FFFFFF",
"euiColorTextGhost": "#FFFFFF",
"euiColorTextInk": "#07101F",
"euiColorBackgroundBasePrimary": "#E8F1FF",
"euiColorBackgroundBaseAccent": "#FFEBF5",
"euiColorBackgroundBaseAccentSecondary": "#E2F9F7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,6 @@ declare module '@elastic/eui-theme-borealis/lib/eui_theme_borealis_light.json' {
euiColorSeverityDanger: string;
euiColorChartLines: string;
euiColorChartBand: string;
euiColorGhost: string;
euiColorInk: string;
euiColorPrimary: string;
euiColorAccent: string;
euiColorAccentSecondary: string;
Expand Down Expand Up @@ -398,6 +396,8 @@ declare module '@elastic/eui-theme-borealis/lib/eui_theme_borealis_light.json' {
euiColorTextSubdued: string;
euiColorTextDisabled: string;
euiColorTextInverse: string;
euiColorTextGhost: string;
euiColorTextInk: string;
euiColorBackgroundBasePrimary: string;
euiColorBackgroundBaseAccent: string;
euiColorBackgroundBaseAccentSecondary: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/eui-theme-borealis/src/variables/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $euiButtonTypes: (
warning: $euiColorBackgroundFilledWarning,
risk: $euiColorBackgroundFilledRisk,
danger: $euiColorBackgroundFilledDanger,
ghost: $euiColorGhost, // Ghost is special, and does not care about theming.
ghost: $euiColorPlainLight, // Ghost is color-mode-invariant
text: $euiColorBackgroundFilledText, // Reserved for special use cases
) !default;

Expand Down
10 changes: 8 additions & 2 deletions packages/eui-theme-borealis/src/variables/_overrides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ import { severityColorsLightHighContrast } from './colors/_colors_severity_hcm';
export const overrides: _EuiThemeOverrides = {
HCM: {
colors: {
ink: PRIMITIVE_COLORS.black,
ghost: PRIMITIVE_COLORS.white,
plainDark: PRIMITIVE_COLORS.black,
plainLight: PRIMITIVE_COLORS.white,
DARK: {
textInk: PRIMITIVE_COLORS.black,
textGhost: PRIMITIVE_COLORS.white,
},
LIGHT: {
textInk: PRIMITIVE_COLORS.black,
textGhost: PRIMITIVE_COLORS.white,
vis: visColorsLightHighContrast,
severity: severityColorsLightHighContrast,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Shadows
$euiShadowColor: $euiColorInk !default;
$euiShadowColor: $euiColorPlainDark !default;

$euiShadowDownXS: 0 1px 4px 0 hsla(from $euiShadowColor h s l / 0.4), 0 2px 8px 0 hsla(from $euiShadowColor h s l / 0.24);
$euiShadowDownS: 0 2px 7px 0 hsla(from $euiShadowColor h s l / 0.46), 0 4px 11px 0 hsla(from $euiShadowColor h s l / 0.26);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@

@import 'semantic_colors';

// Constants (legacy)
$euiColorGhost: $euiColorWhite !default;
$euiColorInk: $euiColorBlack !default;

Comment thread
mgadewoll marked this conversation as resolved.
// Brand
$euiColorPrimary: $euiColorPrimary60 !default;
$euiColorAccent: $euiColorAccent60 !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export const dark_text_colors: _EuiThemeTextColors = {
textSubdued: SEMANTIC_COLORS.shade55,
textDisabled: SEMANTIC_COLORS.shade80,
textInverse: SEMANTIC_COLORS.plainDark,
textInk: SEMANTIC_COLORS.plainDark,
textGhost: SEMANTIC_COLORS.plainLight,
};

export const dark_shades: _EuiThemeShadeColors = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@

@import 'semantic_colors';

// These colors stay the same no matter the theme
// @deprecated
$euiColorGhost: $euiColorWhite !default;
$euiColorInk: $euiColorBlack !default;

// Brand
$euiColorPrimary: $euiColorPrimary90 !default;
$euiColorAccent: $euiColorAccent90 !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export const text_colors: _EuiThemeTextColors = {
textSubdued: SEMANTIC_COLORS.shade95,
textDisabled: SEMANTIC_COLORS.shade70,
textInverse: SEMANTIC_COLORS.plainLight,
textInk: SEMANTIC_COLORS.plainDark,
textGhost: SEMANTIC_COLORS.plainLight,
};

export const shade_colors: _EuiThemeShadeColors = {
Expand Down
2 changes: 0 additions & 2 deletions packages/eui-theme-borealis/src/variables/colors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import { colorVisDark } from './_colors_vis_dark';
import { severityColors } from './_colors_severity';

export const colors: _EuiThemeColors = {
ghost: SEMANTIC_COLORS.plainLight,
ink: SEMANTIC_COLORS.plainDark,
plainLight: SEMANTIC_COLORS.plainLight,
plainDark: SEMANTIC_COLORS.plainDark,

Expand Down
5 changes: 5 additions & 0 deletions packages/eui-theme-common/changelogs/upcoming/9379.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- Added `textInk` and `textGhost` color tokens for text and icon colors that should always remain dark or light regardless of color mode.

**Breaking changes**

- Removed `ink` and `ghost` theme tokens. Use `textInk` / `textGhost` for text and icon colors or `plainDark` /`plainLight` for non-text use cases.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

// Mixes a provided color with white.
@function tint($color, $percent) {
@return mix($euiColorGhost, $color, $percent);
@return mix($euiColorPlainLight, $color, $percent);
}

// Mixes a provided color with black.
@function shade($color, $percent) {
@return mix($euiColorInk, $color, $percent);
@return mix($euiColorPlainDark, $color, $percent);
}

// For theming. Checks the text color and tells us whether it's light or dark.
Expand Down Expand Up @@ -72,7 +72,7 @@
// Given $color, decide whether $lightText or $darkText should be used as the text color
// ex: chooseLightOrDarkText(#EEE, #FFF, #000) would return #000 because it has
// a higher contrast than #FFF against a #EEE background.
@function chooseLightOrDarkText($background, $lightText: $euiColorGhost, $darkText: $euiColorInk) {
@function chooseLightOrDarkText($background, $lightText: $euiColorPlainLight, $darkText: $euiColorPlainDark) {
$lightContrast: contrastRatio($background, $lightText);
$darkContrast: contrastRatio($background, $darkText);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@mixin euiToolTipStyle($size: null) {
@include euiBottomShadow($color: $euiColorInk);
@include euiBottomShadow($color: $euiColorPlainDark);

$euiTooltipBackgroundColor: tintOrShade($euiColorFullShade, 25%, 100%) !default;
$euiTooltipBorderColor: tintOrShade($euiColorFullShade, 35%, 80%) !default;

border-radius: $euiBorderRadius;
background-color: $euiTooltipBackgroundColor;
color: $euiColorGhost;
color: $euiColorPlainLight;
z-index: $euiZLevel9;
max-width: 256px;
overflow-wrap: break-word;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $euiButtonTypes: (
success: $euiColorSuccess,
warning: $euiColorWarning,
danger: $euiColorDanger,
ghost: $euiColorGhost, // Ghost is special, and does not care about theming.
ghost: $euiColorPlainLight, // Ghost is color-mode-invariant
text: $euiColorDarkShade, // Reserved for special use cases
) !default;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ export type _EuiThemeTextColors = {
textSubdued: ColorModeSwitch;
textDisabled: ColorModeSwitch;
textInverse: ColorModeSwitch;
textInk: ColorModeSwitch;
textGhost: ColorModeSwitch;
};

export type _EuiThemeSpecialColors = {
Expand Down Expand Up @@ -367,9 +369,6 @@ export type _EuiThemeSeverityColors = {
};

export type _EuiThemeConstantColors = {
ghost: string;
ink: string;

plainLight: string;
plainDark: string;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ export const euiBetaBadgeStyles = (euiThemeContext: UseEuiTheme) => {
&:focus {
${euiFocusRing(euiThemeContext, 'outset', {
color:
colorMode === 'DARK' ? euiTheme.colors.ghost : euiTheme.colors.ink,
colorMode === 'DARK'
? euiTheme.colors.plainLight
: euiTheme.colors.plainDark,
})}
}
`,
Expand Down
4 changes: 2 additions & 2 deletions packages/eui/src/components/badge/color_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ export const getBadgeColors = (

export const getTextColor = ({ euiTheme }: UseEuiTheme, bgColor: string) => {
const textColor = isColorDark(...chroma(bgColor).rgb())
? euiTheme.colors.ghost
: euiTheme.colors.ink;
? euiTheme.colors.textGhost
: euiTheme.colors.textInk;

return textColor;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const EuiCodeBlockAnnotation: FunctionComponent<

const { euiTheme, colorMode } = useEuiTheme();
const isDarkMode = colorMode === 'DARK';
const iconColor = isDarkMode ? euiTheme.colors.ink : 'ghost';
const iconColor = isDarkMode ? euiTheme.colors.textInk : 'ghost';

return (
<EuiPopover
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const euiCollapsibleNavGroupStyles = ({ euiTheme }: UseEuiTheme) => {
.euiCollapsibleNavGroup__title,
.euiCollapsibleNavGroup__heading,
.euiAccordion__arrow {
color: ${euiTheme.colors.ghost};
color: ${euiTheme.colors.textGhost};
}
`,
// Header padding
Expand Down
6 changes: 3 additions & 3 deletions packages/eui/src/components/color_picker/hue.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export const euiHueStyles = (euiThemeContext: UseEuiTheme) => {
box-shadow: ${thumbBoxShadow};
`,
preferred: `
background-color: ${euiTheme.colors.ghost};
border: ${thumbBorder} solid ${euiTheme.colors.ink};
background-color: ${euiTheme.colors.plainLight};
border: ${thumbBorder} solid ${euiTheme.colors.plainDark};
box-shadow: none;
`,
})}
Expand All @@ -119,7 +119,7 @@ export const euiHueStyles = (euiThemeContext: UseEuiTheme) => {
preferred: `
&:focus {
${euiRangeThumbPerBrowser(`
outline: ${euiTheme.border.width.thin} solid ${euiTheme.colors.ink};
outline: ${euiTheme.border.width.thin} solid ${euiTheme.colors.plainDark};
outline-offset: 0;
`)}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const euiSaturationStyles = (euiThemeContext: UseEuiTheme) => {
border-color: ${euiTheme.colors.primary};
`,
preferred: `
outline: ${euiTheme.border.width.thin} solid ${euiTheme.colors.ink};
outline: ${euiTheme.border.width.thin} solid ${euiTheme.colors.plainDark};
outline-offset: 0;
`,
})}
Expand Down Expand Up @@ -118,8 +118,8 @@ export const euiSaturationStyles = (euiThemeContext: UseEuiTheme) => {
}
`,
preferred: `
border: ${euiTheme.border.width.thick} solid ${euiTheme.colors.ink};
background-color: ${euiTheme.colors.ghost};
border: ${euiTheme.border.width.thick} solid ${euiTheme.colors.plainDark};
background-color: ${euiTheme.colors.plainLight};
`,
})}
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export const euiRangeLevelsStyles = (euiThemeContext: UseEuiTheme) => {
const range = euiRangeVariables(euiThemeContext);

const isColorDark = colorMode === 'DARK';
const stripeColor = isColorDark ? euiTheme.colors.ink : euiTheme.colors.ghost;
const stripeColor = isColorDark
? euiTheme.colors.plainDark
: euiTheme.colors.plainLight;
const stripesBackground = `repeating-linear-gradient(
-45deg,
${transparentize(stripeColor, 0.5)},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const euiRangeTooltipValueStyles = (euiThemeContext: UseEuiTheme) => {
transform: translateY(-50%);

${euiFontSize(euiThemeContext, 's')}
color: ${euiTheme.colors.ghost};
color: ${euiTheme.colors.textGhost};
background-color: ${toolTipBackgroundColor};
border: ${euiTheme.border.width.thin} solid ${borderColor};
border-radius: ${euiTheme.border.radius.small};
Expand Down
2 changes: 1 addition & 1 deletion packages/eui/src/components/header/header.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const euiHeaderDarkStyles = (euiThemeContext: UseEuiTheme) => {
.euiHeaderLogo__text,
.euiHeaderLink,
.euiHeaderSectionItemButton {
color: ${euiTheme.colors.ghost};
color: ${euiTheme.colors.textGhost};
}

.euiHeaderLink-isActive {
Expand Down
2 changes: 1 addition & 1 deletion packages/eui/src/components/icon/icon.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const euiIconStyles = ({ euiTheme }: UseEuiTheme) => ({
color: ${euiTheme.colors.textAccentSecondary};
`,
ghost: css`
color: ${euiTheme.colors.ghost};
color: ${euiTheme.colors.textGhost};

/* Really force all paths to inherit (specifically for logos) */
*[fill],
Expand Down
6 changes: 3 additions & 3 deletions packages/eui/src/components/image/image_caption.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ export const euiImageCaptionStyles = (euiThemeContext: UseEuiTheme) => {
${logicalCSS('margin-top', euiTheme.size.xs)}
`,
isOnOverlayMask: css`
color: ${euiTheme.colors.ghost};
text-shadow: 0 1px 2px ${transparentize(euiTheme.colors.ink, 0.6)};
color: ${euiTheme.colors.textGhost};
text-shadow: 0 1px 2px ${transparentize(euiTheme.colors.plainDark, 0.6)};

[class*='euiLink'] {
/* Override link color for visibility */
color: ${euiTheme.colors.ghost};
color: ${euiTheme.colors.textGhost};
}
`,
};
Expand Down
2 changes: 1 addition & 1 deletion packages/eui/src/components/link/link.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const euiLinkStyles = (euiThemeContext: UseEuiTheme) => {
accent: css(_colorCSS(euiTheme.colors.textAccent)),
danger: css(_colorCSS(euiTheme.colors.textDanger)),
warning: css(_colorCSS(euiTheme.colors.textWarning)),
ghost: css(_colorCSS(euiTheme.colors.ghost)),
ghost: css(_colorCSS(euiTheme.colors.textGhost)),
text: css(_colorCSS(euiTheme.colors.textParagraph)),
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const euiListGroupItemInnerStyles = (euiThemeContext: UseEuiTheme) => {
color: ${euiTheme.colors.subduedText};
`,
ghost: css`
color: ${euiTheme.colors.ghost};
color: ${euiTheme.colors.textGhost};
`,
// Variants
isDisabled: css`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ export const euiMarkdownFormatStyles = (euiThemeContext: UseEuiTheme) => {
euiMarkdownAdjustBorderColors(euiThemeContext, euiTheme.colors.danger)
),
ghost: css(
euiMarkdownAdjustBorderColors(euiThemeContext, euiTheme.colors.ghost)
euiMarkdownAdjustBorderColors(
euiThemeContext,
euiTheme.colors.plainLight
)
),
inherit: css(
euiMarkdownAdjustBorderColors(euiThemeContext, 'currentColor')
Expand Down
Loading