Skip to content

Commit 3549ae9

Browse files
authored
Fix pink colors in examples (#12451)
# Objective I was wondering why the `lighting` example was still looking quite different lately (specifically, the intensity of the green light on the cube) and noticed that we had one more color change I didn't catch before. Prior to the `bevy_color` port, `PINK` was actually "deep pink" from the css4 spec. `palettes::css::PINK` is now correctly a lighter pink color defined by the same spec. ```rust // Bevy 0.13 pub const PINK: Color = Color::rgb(1.0, 0.08, 0.58); // Bevy 0.14-dev pub const PINK: Srgba = Srgba::new(1.0, 0.753, 0.796, 1.0); pub const DEEP_PINK: Srgba = Srgba::new(1.0, 0.078, 0.576, 1.0); ``` ## Solution Change usages of `css::PINK` to `DEEP_PINK` to restore the examples to their former colors.
1 parent adb8669 commit 3549ae9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

examples/3d/lighting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fn setup(
9999
PbrBundle {
100100
mesh: meshes.add(Cuboid::default()),
101101
material: materials.add(StandardMaterial {
102-
base_color: PINK.into(),
102+
base_color: DEEP_PINK.into(),
103103
..default()
104104
}),
105105
transform: Transform::from_xyz(0.0, 0.5, 0.0),

examples/3d/wireframe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Color: {:?}
146146
// Toggle the global wireframe color
147147
if keyboard_input.just_pressed(KeyCode::KeyX) {
148148
config.default_color = if config.default_color == WHITE.into() {
149-
PINK.into()
149+
DEEP_PINK.into()
150150
} else {
151151
WHITE.into()
152152
};

examples/stress_tests/many_lights.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use std::f64::consts::PI;
55

66
use bevy::{
7-
color::palettes::css::PINK,
7+
color::palettes::css::DEEP_PINK,
88
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin},
99
math::{DVec2, DVec3},
1010
pbr::{ExtractedPointLight, GlobalLightMeta},
@@ -62,7 +62,7 @@ fn setup(
6262

6363
let mesh = meshes.add(Cuboid::default());
6464
let material = materials.add(StandardMaterial {
65-
base_color: PINK.into(),
65+
base_color: DEEP_PINK.into(),
6666
..default()
6767
});
6868

examples/ui/grid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ fn spawn_layout(mut commands: Commands, asset_server: Res<AssetServer>) {
109109
item_rect(builder, CRIMSON);
110110
item_rect(builder, ANTIQUE_WHITE);
111111
item_rect(builder, YELLOW);
112-
item_rect(builder, PINK);
112+
item_rect(builder, DEEP_PINK);
113113
item_rect(builder, YELLOW_GREEN);
114114
item_rect(builder, SALMON);
115115
});

0 commit comments

Comments
 (0)