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 a 'Color' type #50

Closed
cmyr opened this issue Jun 11, 2019 · 2 comments
Closed

Add a 'Color' type #50

cmyr opened this issue Jun 11, 2019 · 2 comments
Labels
enhancement adds or requests a new feature

Comments

@cmyr
Copy link
Member

cmyr commented Jun 11, 2019

This could even just be a newtype around u32 for now, but we will need one eventually and it makes sense to put something in place now.

@cmyr cmyr added the enhancement adds or requests a new feature label Jun 11, 2019
@raphlinus
Copy link
Contributor

I think this is already tracked in linebender/piet#40 .

I definitely see that I was oversimplifying when I used u32 for rgba 8 bit in piet. You can get away with it for a text editor, but we're going into a new world of hdr, and hardcoding color as u32 will shortly be seen as primitive. But we can have a low-noise conversion, or maybe actually an into, and it will be just as good and a lot more principled.

@raphlinus
Copy link
Contributor

Fixed as of linebender/piet#48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement adds or requests a new feature
Projects
None yet
Development

No branches or pull requests

2 participants