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

Separation of the RGB types #7

Closed
Ogeon opened this issue Jan 12, 2016 · 1 comment · Fixed by #24
Closed

Separation of the RGB types #7

Ogeon opened this issue Jan 12, 2016 · 1 comment · Fixed by #24
Milestone

Comments

@Ogeon
Copy link
Owner

Ogeon commented Jan 12, 2016

This makes it possible to make use of the type system to differ between them and linear RGB, and lowers the number of constructors on Rgb.

Suggestion from Reddit user CryZe92

This was referenced Jan 12, 2016
@Ogeon Ogeon changed the title Consider adding separate sRGB and gamma corrected RGB types Separation of the RGB types Jan 19, 2016
@Ogeon
Copy link
Owner Author

Ogeon commented Jan 19, 2016

I renamed this to cover RGB types in general. I think we can keep linear sRGB as the default, since it's very common in computer graphics, and add the other variants as additional types.

@homu homu closed this as completed in #24 Jan 24, 2016
homu added a commit that referenced this issue Jan 24, 2016
Separate sRGB and gamma encoded RGB from the Rgb type

This closes #7 by adding separate types for sRGB and gamma encoded RGB. `Rgb` becomes a purely linear variant of sRGB and the types for encoded sRGB and gamma RGB can be found in a newly added `pixel` module. The `RgbPixel` trait has also been moved to the `pixel` module.

The `linear_*` prefix has also been dropped from the `Rgb` constructors and some bugs from #18 were fixed as a bonus.

This is a breaking change, since it moves, removes and renames a lot of functions, and the `RgbPixel` trait is no longer available in the crate root.
@Ogeon Ogeon added this to the 0.2.0 milestone Jan 25, 2016
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 a pull request may close this issue.

1 participant