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

Color improvements #74

Closed
PvdBerg1998 opened this issue Jul 27, 2019 · 3 comments · Fixed by #77
Closed

Color improvements #74

PvdBerg1998 opened this issue Jul 27, 2019 · 3 comments · Fixed by #77
Labels
feature New feature or request good first issue Good for newcomers
Milestone

Comments

@PvdBerg1998
Copy link
Contributor

Some ideas possibly worth implementing:

  • Hex constructor: Color::hex(0xFFFFFF)
  • Debug assertions for invalid arguments
  • Additional constants
@PvdBerg1998
Copy link
Contributor Author

  • Other color spaces (constructors and conversion)

@hecrj hecrj added feature New feature or request good first issue Good for newcomers labels Jul 28, 2019
@hecrj
Copy link
Owner

hecrj commented Jul 28, 2019

Hex constructor: Color::hex(0xFFFFFF)

The lack of a u24 type makes this a bit awkward, but I think it's fine provided that we find a good name for it. ggez calls it from_rgb_u32.

Additional constants

Do you mean additional built-in colors? I think the idea is to encourage users to define their own color palettes, instead of providing a default one.

Other color spaces (constructors and conversion)

This would be great, but it feels a bit out of scope. There are already other color crates that can do the job, like palette.

@PvdBerg1998
Copy link
Contributor Author

Do you mean additional built-in colors? I think the idea is to encourage users to define their own color palettes, instead of providing a default one.

Is it okay to add some simple constants like red and green? I like to use them for quick prototyping when I just want some placeholder colors.

@hecrj hecrj closed this as completed in #77 Jul 28, 2019
@hecrj hecrj added this to the 0.4.0 milestone Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants