Stat/Table: Fixes contrast color, was flipped in theme refactoring (#33345)

* Stat/Table: Fixes contrast color, was flipped in theme refactoring

* Updated snapshot
This commit is contained in:
Torkel Ödegaard 2021-04-24 14:27:27 +02:00 committed by GitHub
parent 50018f37f2
commit ad63f871ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ exports[`BigValue Render with basic options should render 1`] = `
<FormattedDisplayValue
style={
Object {
"color": "rgb(32, 34, 38)",
"color": "rgb(247, 248, 250)",
"fontSize": 230,
"fontWeight": 500,
"lineHeight": 1.2,

View File

@ -114,7 +114,7 @@ function hslToHex(color: any) {
export function getTextColorForBackground(color: string) {
const b = tinycolor(color).getBrightness();
return b > 180 ? 'rgb(247, 248, 250)' : 'rgb(32, 34, 38)';
return b > 180 ? 'rgb(32, 34, 38)' : 'rgb(247, 248, 250)';
}
export let sortedColors = sortColorsByHue(colors);