Skip to content

Various examples are incorrectly using GREEN #12225

@rparrett

Description

@rparrett

Bevy version

main, after #12163

What went wrong

So we've got a few different greens now.

pub const GREEN: LegacyColor = LegacyColor::rgb(0.0, 1.0, 0.0);
// palettes::basic
pub const GREEN: Srgba = Srgba::new(0.0, 0.5, 0.0, 1.0);
// palettes::css
// (but `basic` is re-exported in `css`, which possibly overrides this?)
// note: I think that this difference is probably large enough to cause very slight "real" differences
// depending on what sort of conversions or rounding it goes through.
pub const GREEN: Srgba = Srgba::new(0.0, 0.502, 0.0, 1.0);
// LinearRgba
pub const GREEN: Self = Self {
    red: 0.0,
    green: 1.0,
    blue: 0.0,
    alpha: 1.0,
};

And this is causing some problems in various examples that previously used the full-green LegacyColor::GREEN.

The most obvious to me is bounding_2d example where the ray intersection is drawn in green, which is much harder to see now.

We should:

  • look at our usages of GREEN throughout examples and see if those should be LIME.
  • remove GREEN from the css palette.

Note: LIME is "full green" according to the css specs, and LIMEGREEN is a separate color that is inbetween LIME and GREEN.

Examples don't need to be identical to how they looked previous to the big migration, but if a very bright green was intended and now it is very dark we may want to fix that.

https://thebevyflock.github.io/bevy-example-runner/ will be handy for tracking these down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-ExamplesAn addition or correction to our examplesD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions