Skip to content

Commit

Permalink
Update colors in examples from rgb* -> srgb*
Browse files Browse the repository at this point in the history
Addresses Bevy [12163](bevyengine/bevy#12163)
  • Loading branch information
zhaop committed Jun 25, 2024
1 parent 8a71420 commit a9e1867
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions crates/bevy_editor_pls/examples/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
border: UiRect::all(Val::Px(2.0)),
..default()
},
background_color: Color::rgb(0.65, 0.65, 0.65).into(),
background_color: Color::srgb(0.65, 0.65, 0.65).into(),
..default()
})
.with_children(|parent| {
Expand All @@ -55,7 +55,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
height: Val::Percent(100.0),
..default()
},
background_color: Color::rgb(0.15, 0.15, 0.15).into(),
background_color: Color::srgb(0.15, 0.15, 0.15).into(),
..default()
})
.with_children(|parent| {
Expand Down Expand Up @@ -86,7 +86,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
height: Val::Percent(100.0),
..default()
},
background_color: Color::rgb(0.15, 0.15, 0.15).into(),
background_color: Color::srgb(0.15, 0.15, 0.15).into(),
..default()
})
.with_children(|parent| {
Expand Down Expand Up @@ -122,7 +122,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
overflow: Overflow::clip(),
..default()
},
background_color: Color::rgb(0.10, 0.10, 0.10).into(),
background_color: Color::srgb(0.10, 0.10, 0.10).into(),
..default()
})
.with_children(|parent| {
Expand Down Expand Up @@ -178,7 +178,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
border: UiRect::all(Val::Px(20.0)),
..default()
},
background_color: Color::rgb(0.4, 0.4, 1.0).into(),
background_color: Color::srgb(0.4, 0.4, 1.0).into(),
..default()
})
.with_children(|parent| {
Expand All @@ -188,7 +188,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
height: Val::Percent(100.0),
..default()
},
background_color: Color::rgb(0.8, 0.8, 1.0).into(),
background_color: Color::srgb(0.8, 0.8, 1.0).into(),
..default()
});
});
Expand All @@ -213,7 +213,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
height: Val::Px(100.0),
..default()
},
background_color: Color::rgb(1.0, 0.0, 0.0).into(),
background_color: Color::srgb(1.0, 0.0, 0.0).into(),
..default()
})
.with_children(|parent| {
Expand All @@ -226,7 +226,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
bottom: Val::Px(20.0),
..default()
},
background_color: Color::rgb(1.0, 0.3, 0.3).into(),
background_color: Color::srgb(1.0, 0.3, 0.3).into(),
..default()
});
parent.spawn(NodeBundle {
Expand All @@ -238,7 +238,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
bottom: Val::Px(40.0),
..default()
},
background_color: Color::rgb(1.0, 0.5, 0.5).into(),
background_color: Color::srgb(1.0, 0.5, 0.5).into(),
..default()
});
parent.spawn(NodeBundle {
Expand All @@ -250,7 +250,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
bottom: Val::Px(60.0),
..default()
},
background_color: Color::rgb(1.0, 0.7, 0.7).into(),
background_color: Color::srgb(1.0, 0.7, 0.7).into(),
..default()
});
// alpha test
Expand All @@ -263,7 +263,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
bottom: Val::Px(80.0),
..default()
},
background_color: Color::rgba(1.0, 0.9, 0.9, 0.4).into(),
background_color: Color::srgba(1.0, 0.9, 0.9, 0.4).into(),
..default()
});
});
Expand Down

0 comments on commit a9e1867

Please sign in to comment.