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

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


(cherry picked from commit b24f33a)

Signed-off-by: Josh Romero <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 4db18c9 commit f269920
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 f269920

Please sign in to comment.