[v11.0.x] Table Panel: Fix issue causing incorrect background coloring (#85214)

Table Panel: Fix issue causing incorrect background coloring (#85121)

Fix color bug

(cherry picked from commit c9f9e94a6c)

Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
pull/85225/head
grafana-delivery-bot[bot] 1 year ago committed by GitHub
parent 300008e300
commit 9afbd19874
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      packages/grafana-data/src/themes/createVisualizationColors.ts
  2. 2
      packages/grafana-ui/src/components/Table/utils.ts

@ -52,7 +52,7 @@ export function createVisualizationColors(colors: ThemeColors): ThemeVisualizati
}
// special colors
byNameIndex['transparent'] = 'rgba(0,0,0,0)';
byNameIndex['transparent'] = colors.mode === 'light' ? 'rgba(255, 255, 255, 0)' : 'rgba(0,0,0,0)';
byNameIndex['panel-bg'] = colors.background.primary;
byNameIndex['text'] = colors.text.primary;

@ -617,7 +617,7 @@ export function getCellColors(
if (mode === TableCellBackgroundDisplayMode.Basic) {
textColor = getTextColorForAlphaBackground(displayValue.color!, tableStyles.theme.isDark);
bgColor = tinycolor(displayValue.color).setAlpha(1).toRgbString();
bgColor = tinycolor(displayValue.color).setAlpha(0.9).toRgbString();
} else if (mode === TableCellBackgroundDisplayMode.Gradient) {
const bgColor2 = tinycolor(displayValue.color)
.darken(10 * darkeningFactor)

Loading…
Cancel
Save