@opendata-ai/openchart-core 7.0.2 → 7.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -861,11 +861,12 @@ function _luminanceFromHex(color2) {
861
861
  }
862
862
  function adaptTheme(theme) {
863
863
  const inputBg = theme.colors.background;
864
- const alreadyDark = inputBg === "transparent" || _luminanceFromHex(inputBg) < 0.2;
864
+ const isTransparent = inputBg === "transparent";
865
+ const alreadyDark = isTransparent || _luminanceFromHex(inputBg) < 0.2;
865
866
  const darkBg = alreadyDark ? inputBg : DARK_BG;
866
- const darkText = alreadyDark ? theme.colors.text : DARK_TEXT;
867
- const darkGridline = alreadyDark ? theme.colors.gridline : "rgba(255,255,255,0.05)";
868
- const darkAxis = alreadyDark ? theme.colors.axis : "#a1a1aa";
867
+ const darkText = DARK_TEXT;
868
+ const darkGridline = "rgba(255,255,255,0.05)";
869
+ const darkAxis = "#a1a1aa";
869
870
  const darkMuted = ACHROMATIC_RAMP.fgMuted;
870
871
  const categorical = theme.colors.categorical;
871
872
  return {