-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Visual Refresh] Update vis colors and palettes #8112
[Visual Refresh] Update vis colors and palettes #8112
Conversation
export const euiPaletteForTemperature = function (steps: number): EuiPalette { | ||
const cools = colorPalette([...coolArray.slice().reverse(), '#EBEFF5'], 3); | ||
const warms = colorPalette(['#F4F3DB', ...warmArray], 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ I made an opinionated change here, that affects Amsterdam:
Here for warm colors it's using #F4F3DB
while further down here it's using #FBFBDC
.
Those two colors are very similar and to make everything more logical when using tokens, I changed those to use the same color.
Screen.Recording.2024-11-06.at.07.57.25.mov
This will affect Kibana where tests check for color values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm cool with this change as long as designers don't mind. We can merge it to the feature branch and confirm with them
const greenColor: HEX = '#209280'; | ||
const redColor: HEX = '#CC5642'; | ||
const lightRedColor: HEX = euiPaletteColorBlind()[9]; | ||
const coolArray: HEX[] = [euiPaletteColorBlind()[1], '#6092C0']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ This seemed like a mistake, as the coolArray
holds the same colors this way because euiPaletteColorBlind()[1]
is #6092C0
(2) ['#6092C0', '#6092C0']
packages/eui/src-docs/src/views/color_palette/color_palette_quantitative.js
Show resolved
Hide resolved
packages/eui/src-docs/src/views/color_picker/color_palette_display.js
Outdated
Show resolved
Hide resolved
}; | ||
} | ||
|
||
export class EuiVisColorStore { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to be a class really. In JS it's usually preferred to have it as a function instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ We agreed to keep the class here for now as refactoring would cost more time and can still be done separately after.
Additionally, our longer term idea is to change how palettes work in general, moving towards context instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look solid. I don't have any major objections, just the comments I added above.
-updates store on provider theme change - moves vis colors to amsterdam theme from common
… usages are reactive to store updates
f7db3c3
to
9aeec86
Compare
Preview staging links for this PR:
|
💚 Build Succeeded
History
|
Summary
closes https://github.com/elastic/eui-private/issues/127
Important
This PR merges into a feature branch.
Note
The first commit of this PR is duplicated from this other PR to ensure shared setup. This commit should not be review on this PR but the previous one.
This PR adds theme specific visualization colors and updates eui color palettes to use theme-specific colors.
Changes
EuiVisColorStore
- stores current theme vis colors onEuiProvider
theme changeEuiVisColorStore
instead of static values#unrelated
QA