Skip to content

Conversation

@mwcampbell
Copy link
Contributor

This is so there's no confusion about how the color components are packed into an integer. And since the original doc comments specified RGBA, I've kept the alpha component.

#[cfg_attr(feature = "schemars", derive(JsonSchema))]
#[cfg_attr(feature = "serde", serde(deny_unknown_fields))]
#[repr(C)]
pub struct Color {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the goal is to improve readability, I'd suggest renaming the fields with actual words, we're not all graphics programming experts. Here's the documentation of the Bevy Color struct for reference.

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 this pull request may close these issues.

3 participants