Component conversion #334
andrewbaxter
started this conversation in
General
Replies: 1 comment 3 replies
-
Ah, I also needed to make sure they were unsigned, ended up with these monstrous hex literals
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I ran into some issues while trying to convert from srgb to oklch.
My code is
I get a slew of missing trait errors like
->
Powf
Hypot
Trigonometry
RealAngle
.I'm coming from html, so I was using the hex trick, but I think this leaves me with u8 components. My guess is (haven't tried this out yet) I need to convert from u8 to f32 or something.
I don't see any documentation on component conversions rather than color space conversions, but maybe this error is unexpected. It looks like there's a potential solution at #267 (
into_format
) - if that's right, as an additional note the nameinto_format
might not be clear (it's not what I'd expect when trying to convert components). I found that via #268 - the discussion title doesn't suggest it's relevant but the issue is clearer.Thanks for the awesome library!
Beta Was this translation helpful? Give feedback.
All reactions