-
Notifications
You must be signed in to change notification settings - Fork 74
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
less verbosity in ui::Color::Rgb{...} #41
Comments
I agree it has its benefits. Using a struct provides better readability when reading the values (e.g. Would you be willing to make a PR? |
Oh, I didn't think about |
Would you ever be able to use That said, I quite like the explicitness of naming the fields here even when it might not be necessary. What about adding an |
Both your points are perfect to me. It can get cumbersome on pattern matching and the like but I quite like to be explicit as well. Let's go with the static method. |
Allows an Rgb Color variant to be created as if it was a tuple variant while maintaining the named fields of the struct type. Fixes mikaelmello#41
I suggest replacing it with ui::Color::Rgb(u8, u8, u8)
The text was updated successfully, but these errors were encountered: