Ogeon / palette

A Rust library for linear color calculations and conversion
Apache License 2.0
749 stars 60 forks source link

Add traits for color schemes from traditional color theory #384

Closed Ogeon closed 5 months ago

Ogeon commented 5 months ago

This adds traits for the complementary, split complementary, analogous, triadic and tetradic color schemes. A trait for the complementary color was requested in #383, but all of these may be useful.

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 82.52033% with 43 lines in your changes are missing coverage. Please review.

Project coverage is 81.94%. Comparing base (c54efbd) to head (479beec).

Files Patch % Lines
palette/src/macros/color_theory.rs 76.00% 24 Missing :warning:
palette/src/serde/alpha_serializer.rs 24.00% 19 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #384 +/- ## ========================================== + Coverage 81.82% 81.94% +0.12% ========================================== Files 113 115 +2 Lines 18068 18277 +209 Branches 18068 18277 +209 ========================================== + Hits 14785 14978 +193 - Misses 3125 3141 +16 Partials 158 158 ```

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

codspeed-hq[bot] commented 5 months ago

CodSpeed Performance Report

Merging #384 will improve performances by 11.42%

Comparing color_theory (479beec) with master (c54efbd)

Summary

⚡ 1 improvements ✅ 44 untouched benchmarks

Benchmarks breakdown

Benchmark master color_theory Change
matrix_inverse 271.1 ns 243.3 ns +11.42%