Repository navigation
Read the CSS named colors that ReportLab lacks or defines differently - #542
Merged
Merged
Conversation
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.
Comparing ReportLab's named colors with the CSS list (148 names, from tinycss2), three differ:
rebeccapurple(#663399, CSS Color 4) andlightgray(#d3d3d3; ReportLab only haslightgrey) are missing, sofill="rebeccapurple"leaves the shape without a fill and logsCan't handle color.darkseagreenis#8fbc8bin ReportLab but#8fbc8fin CSS.convertColor()now looks these three up in a small_CSS_NAMED_COLORStable before falling back to ReportLab's colors. I didn't usetinycss2.color4for this because svglib still allows tinycss2 0.6, which doesn't have it.Added
test_css_named_colors_missing_in_reportlab; it fails on main. Updatedtests/public_api.jsonwith--updatefor the new private name, and added a### Fixedentry inCHANGELOG.md(I used #542, I'll fix it if the PR gets another number).pytest,ruff format --check,ruff checkandmypy src testspass.AI-assisted (Claude Code); I reviewed and tested the change