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 way of creating a color out of integer RGB values #123

Closed
aaneto opened this issue May 11, 2019 · 1 comment · Fixed by #124
Closed

Add a way of creating a color out of integer RGB values #123

aaneto opened this issue May 11, 2019 · 1 comment · Fixed by #124
Labels
Area: Graphics Issues related to graphics/rendering. Type: Feature Request Improvements that could be made to the code/documentation.

Comments

@aaneto
Copy link
Contributor

aaneto commented May 11, 2019

I believe it is desirable to have a constructor of color that takes u8 numbers as input, such as:

let color = Color::rgbi(80, 80, 80);
// or
let color_alpha = Color::rgbai(80, 80, 80, 255);

Honestly though, I'm pointing this because its my personal preference.

@17cupsofcoffee 17cupsofcoffee added Area: Graphics Issues related to graphics/rendering. Type: Feature Request Improvements that could be made to the code/documentation. labels May 11, 2019
@17cupsofcoffee
Copy link
Owner

Adding rgb8 and rgba8 constructors to Color is definitely something I want to do, I just haven't gotten around to it yet. Might add it this weekend, if I get chance :)

17cupsofcoffee added a commit that referenced this issue May 11, 2019
Implement Color constructors taking integer arguments (fixes #123)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Graphics Issues related to graphics/rendering. Type: Feature Request Improvements that could be made to the code/documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants