mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 04:00:55 +08:00
Table Panel: Fix issue causing incorrect background coloring (#85121)
Fix color bug
This commit is contained in:
@ -52,7 +52,7 @@ export function createVisualizationColors(colors: ThemeColors): ThemeVisualizati
|
|||||||
}
|
}
|
||||||
|
|
||||||
// special colors
|
// 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['panel-bg'] = colors.background.primary;
|
||||||
byNameIndex['text'] = colors.text.primary;
|
byNameIndex['text'] = colors.text.primary;
|
||||||
|
|
||||||
|
@ -617,7 +617,7 @@ export function getCellColors(
|
|||||||
|
|
||||||
if (mode === TableCellBackgroundDisplayMode.Basic) {
|
if (mode === TableCellBackgroundDisplayMode.Basic) {
|
||||||
textColor = getTextColorForAlphaBackground(displayValue.color!, tableStyles.theme.isDark);
|
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) {
|
} else if (mode === TableCellBackgroundDisplayMode.Gradient) {
|
||||||
const bgColor2 = tinycolor(displayValue.color)
|
const bgColor2 = tinycolor(displayValue.color)
|
||||||
.darken(10 * darkeningFactor)
|
.darken(10 * darkeningFactor)
|
||||||
|
Reference in New Issue
Block a user