fix: vlt bar color invisible in dark mode#45
Merged
lukekarrys merged 1 commit intomainfrom Feb 28, 2026
Merged
Conversation
The vlt bar in bar charts used black (#000000) which was invisible on dark backgrounds. Fixed by: - Adding getColor() helper that resolves vlt's display color to white in dark mode across all chart elements (bars, cells, legend dots, tooltips, DNF patterns) - Replacing all 'theme === "dark"' comparisons with 'resolvedTheme === "dark"' so system dark mode preference is correctly detected (theme can be 'system', resolvedTheme is always 'dark' or 'light') Co-authored-by: Luke Karrys <luke@lukekarrys.com>
fd5baa1 to
1835b62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The vlt bar in the bar charts uses black (
#000000) as its brand color, which is invisible on dark backgrounds when dark mode is active. This also affected the legend dots, tooltips, and DNF (did not finish) striped patterns for vlt.Additionally, the component was comparing against
theme(which can be"system") instead ofresolvedTheme(which resolves to the actual"dark"or"light"preference), meaning users with system-level dark mode preferences wouldn't see the fix.Fix
getColor()helper that resolves vlt's display color to white in dark mode, used consistently across all chart elements:chartConfigandindividualChartConfig)theme === "dark"→resolvedTheme === "dark"(6 occurrences) for axis ticks, labels, and legend wrapper styling so system dark mode is correctly detecteduseMemodependency arrays to includeresolvedThemewheregetColoris used, ensuring proper re-rendering on theme changesTesting
tsc -b --noEmit)