Skip to content

Conversation

@GuillaumeGomez
Copy link
Contributor

I was looking for a fully transparent Color and only realize after a long while that Color::NONE was what I was looking for. This is really just a commodity because I think some other people have have stumbled on this. If you think it's useless, please close the PR.

@IceSentry
Copy link
Contributor

Did you commit the right thing? I'm not sure the code is related to adding a new Color

@GuillaumeGomez
Copy link
Contributor Author

... I pushed to the wrong branch. I was updating #6001 in parallel. Fearless concurrency isn't a thing with git. 😆

@IceSentry IceSentry added A-Utils Utility functions and types C-Feature A new feature, making something new possible labels Nov 9, 2022
@mockersf
Copy link
Member

mockersf commented Nov 9, 2022

so... what color is transparent? 🤔

@GuillaumeGomez
Copy link
Contributor Author

Well, at least in french we say "this glass is transparent", so I guess it's a color? ^^'

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use A-UI Graphical user interfaces, styles, layouts, and widgets and removed C-Feature A new feature, making something new possible A-Utils Utility functions and types labels Nov 10, 2022
@tguichaoua
Copy link
Contributor

Is it pertinent to display a colored square in the doc ?
I know it's for the sake of consistency, but it's a bit confusing.

image

@GuillaumeGomez
Copy link
Contributor Author

I took the same HTML as for NONE. So if it's unwanted, I can remove it for both.

@cart
Copy link
Member

cart commented Nov 14, 2022

From my perspective, "transparent" is not a specific color, it is any color with an alpha value of 0.0. There are color algorithms (ex: blending) where the RGB values of a "fully transparent" color matter (ex: in this PR you chose a "black" transparency, but "white" transparency is often equally valid / desirable).

Imo exposing this concept is a lossy abstraction that could cause actual harm.

@GuillaumeGomez GuillaumeGomez deleted the color-transparent branch November 15, 2022 09:59
@GuillaumeGomez
Copy link
Contributor Author

One question: would you accept to add a "doc alias" on Color::NONE so that it is displayed when looking for "transparent"? I can send a PR for that too.

@alice-i-cecile
Copy link
Member

One question: would you accept to add a "doc alias" on Color::NONE so that it is displayed when looking for "transparent"? I can send a PR for that too.

I'd merge that in a heartbeat.

@GuillaumeGomez
Copy link
Contributor Author

Thanks for the quick answer. Then here we go!

bors bot pushed a commit that referenced this pull request Jan 11, 2023
As mentioned in #6530. It allows to not create a new constant and simply having it to show up in the documentation when someone is looking for "transparent" (case insensitive) in rustdoc search.

cc @alice-i-cecile
alradish pushed a commit to alradish/bevy that referenced this pull request Jan 22, 2023
As mentioned in bevyengine#6530. It allows to not create a new constant and simply having it to show up in the documentation when someone is looking for "transparent" (case insensitive) in rustdoc search.

cc @alice-i-cecile
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
As mentioned in bevyengine#6530. It allows to not create a new constant and simply having it to show up in the documentation when someone is looking for "transparent" (case insensitive) in rustdoc search.

cc @alice-i-cecile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants