Skip to content

Porting into_rgb to 0.6 #264

Answered by Ogeon
subpop asked this question in Q&A
Dec 22, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi! You are definitely on the right track, and you are right that the new system doesn't allow converting both color space and encoding in one go. You will have to convert to Srgb first, so something like Srgb::<f64>::from_color(hsv).into_linear() should do the trick. The reason why this restriction is in place is that removing it makes type inference fail a lot more. I chose to keep it more conservative for now, at the cost of having this blind spot.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@subpop
Comment options

@Ogeon
Comment options

Answer selected by subpop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants