@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 +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/theme/dark-mode.ts +11 -8
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
|
|
864
|
+
const isTransparent = inputBg === "transparent";
|
|
865
|
+
const alreadyDark = isTransparent || _luminanceFromHex(inputBg) < 0.2;
|
|
865
866
|
const darkBg = alreadyDark ? inputBg : DARK_BG;
|
|
866
|
-
const darkText =
|
|
867
|
-
const darkGridline =
|
|
868
|
-
const darkAxis =
|
|
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 {
|