mistercrunch commented on code in PR #35211:
URL: https://github.com/apache/superset/pull/35211#discussion_r2364963319


##########
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:
##########
@@ -170,12 +171,25 @@ function cellOffset({
 function cellBackground({
   value,
   colorPositiveNegative = false,
+  theme,
 }: {
   value: number;
   colorPositiveNegative: boolean;
+  theme: SupersetTheme;
 }) {
-  const r = colorPositiveNegative && value < 0 ? 150 : 0;
-  return `rgba(${r},0,0,0.2)`;
+  if (!colorPositiveNegative) {
+    const color = isThemeDark(theme)
+      ? 'rgba(255,255,255,0.3)'
+      : 'rgba(0,0,0,0.2)';
+    return color;
+  }
+
+  const color = isThemeDark(theme)
+    ? value < 0
+      ? `rgba(255,100,100,0.4)`

Review Comment:
   no likey the hard-coded red here, would it make sense to use one of those? 
`colorErrorBg*` is alpha-transparency required here or not



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to