Use paper_bgcolor for parcats text-shadow instead of hardcoding to white #3191
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.
Fix to make parcats look good with a dark theme. Previously the SVG text shadow behind the category labels was hardcoded to white. But this makes the text unbearably blurry when the font is white and the background is dark:
This PR makes the text-shadow take on the color of the
paper_bgcolor
. This doesn't change the appearance with a white background, but significantly improves the situation for dark background:This image is from a new
parcats_dark
mock to 🔒 it in.What about Sankey?
The text shadow logic was largely borrowed from the
sankey
trace type, so I took a look at this trace on a black background as well.It looks like the
sankey
trace doesn't pick up it's default font color fromlayout.font.color
, and it draws all node labels on top of paths, so it's default behavior still works reasonable well on a dark background. So I didn't make any changes to it.