[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>
This commit is contained in:
grafana-delivery-bot[bot]
2024-03-27 03:28:15 +07:00
committed by GitHub
co-authored by Kyle Cunningham
parent 300008e300
commit 9afbd19874
2 changed files with 2 additions and 2 deletions
@@ -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)