Skip to content

Commit

Permalink
Change color fn used to calculate icon colors for search typeahead su…
Browse files Browse the repository at this point in the history
…ggestions

Icons don't need to be as high contrast as text, so the 3:1 threshold of `makeGraphicContrastColor` is more appropriate

Signed-off-by: Josh Romero <[email protected]>
  • Loading branch information
joshuarrrr committed Aug 31, 2023
1 parent ce2d79e commit 84b9709
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/data/public/ui/typeahead/_suggestion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ $osdTypeaheadTypes: (
&.osdSuggestionItem--#{$name} {
.osdSuggestionItem__type {
background-color: tintOrShade($color, 90%, 50%);
color: makeHighContrastColor($color, tintOrShade($color, 90%, 50%));
color: makeGraphicContrastColor($color, tintOrShade($color, 90%, 50%));
}
}
}
Expand Down

0 comments on commit 84b9709

Please sign in to comment.