jwmcglynn / donner

Donner SVG, a modern C++20 SVG rendering library supporting the latest SVG2 and CSS3 standards
https://jwmcglynn.github.io/donner/
ISC License
13 stars 1 forks source link

Support color `hwb()` function and store HSL colors natively without converting to RGB #166

Closed jwmcglynn closed 5 months ago

jwmcglynn commented 5 months ago

Related to #6

Implements support for HSLA color representation and updates the Color class to handle deferred conversion from HSLA to RGBA. Additionally, updates and adds unit tests to validate these changes.


For more details, open the Copilot Workspace session.

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 82.66667% with 26 lines in your changes missing coverage. Please review.

Project coverage is 88.87%. Comparing base (af5964f) to head (4e3e2a8).

Files Patch % Lines
donner/css/parser/ColorParser.cc 67.44% 10 Missing and 4 partials :warning:
donner/css/Color.cc 79.59% 9 Missing and 1 partial :warning:
donner/css/Color.h 71.42% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #166 +/- ## ======================================= Coverage 88.87% 88.87% ======================================= Files 249 249 Lines 19931 20013 +82 Branches 2062 2064 +2 ======================================= + Hits 17713 17786 +73 - Misses 1613 1615 +2 - Partials 605 612 +7 ``` | [Flag](https://app.codecov.io/gh/jwmcglynn/donner/pull/166/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jeff+McGlynn) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/jwmcglynn/donner/pull/166/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jeff+McGlynn) | `88.86% <82.66%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jeff+McGlynn#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jwmcglynn commented 5 months ago

Implements the hwb() function parsing in ColorParser and adds corresponding unit tests.


For more details, open the Copilot Workspace session.