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 (#4884)

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 <rmerqg@amazon.com>
(cherry picked from commit b24f33a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Aug 31, 2023
1 parent 96af535 commit 1e57a97
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 1e57a97

Please sign in to comment.