Repository navigation
fix: choose inside label contrast for gradient fills - #1173
Open
maxneovici wants to merge 1 commit into
Open
maxneovici wants to merge 1 commit into
maxneovici wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Gradient-filled paths currently use the light inside-label fallback regardless of the fill colors, so labels become difficult to read on pale bars and pie segments.
Use average color-stop luminance, matching the existing gradient-background approach, to apply the same label-color thresholds as solid fills. Patterns and empty gradients retain their fallback. Fill definitions are not mutated.
Validation: all 75 unit tests pass, including seven new linear/radial gradient and fallback cases; the modified source passes ESLint. An application-level SVG chart regression fails before the patch and passes afterward in Chromium and Firefox.
npm run checktypereports an existingthistyping error insrc/canvas/Painter.ts:1254; verified the same failure on unmodified HEAD.The fix is also carried as an installed-version patch in https://github.com/Neovici/cosmoz-frontend/pull/11238 while awaiting an upstream release.