Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add From implementations for changing Rgb component types between u8, f32 and f64 #390

Merged
merged 1 commit into from
Apr 20, 2024

Conversation

Ogeon
Copy link
Owner

@Ogeon Ogeon commented Apr 20, 2024

This adds From implementations for Rgb and Rgba for changing the component type between u8, f32 and f64. This should hopefully be easier to discover and remember than from_format and into_format.

@Ogeon Ogeon changed the title Add From implementations for changing Rgb component types between u8, f32 and f64 Add From implementations for changing Rgb component types between u8, f32 and f64 Apr 20, 2024
Copy link

codspeed-hq bot commented Apr 20, 2024

CodSpeed Performance Report

Merging #390 will degrade performances by 10.25%

Comparing rgb_component_type_from_impls (04dbb1a) with master (a22067b)

Summary

⚡ 1 improvements
❌ 1 (👁 1) regressions
✅ 44 untouched benchmarks

Benchmarks breakdown

Benchmark master rgb_component_type_from_impls Change
👁 matrix_inverse 243.3 ns 271.1 ns -10.25%
multiply_3x3 455.6 ns 400 ns +13.89%

Copy link

codecov bot commented Apr 20, 2024

Codecov Report

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

Project coverage is 83.35%. Comparing base (a22067b) to head (04dbb1a).

Files Patch % Lines
palette/src/rgb/rgb.rs 19.51% 33 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #390      +/-   ##
==========================================
- Coverage   83.48%   83.35%   -0.14%     
==========================================
  Files         125      125              
  Lines       20145    20184      +39     
  Branches    20145    20184      +39     
==========================================
+ Hits        16818    16824       +6     
- Misses       3170     3203      +33     
  Partials      157      157              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Ogeon Ogeon merged commit 7fe4d87 into master Apr 20, 2024
15 of 17 checks passed
@Ogeon Ogeon deleted the rgb_component_type_from_impls branch April 27, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant