Skip to content

Commit bd36b85

Browse files
committed
Use RED, LIME, BLUE from bevy::color::palettes::css & Into<Color>
Addresses Bevy #12163 (bevyengine/bevy#12163)
1 parent 317add5 commit bd36b85

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

crates/transform-gizmo-bevy/examples/bevy_minimal.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! A very simple example
22
//! See the project root's `examples` directory for more examples
33
4+
use bevy::color::palettes::css::LIME;
45
use bevy::prelude::*;
56
use transform_gizmo_bevy::*;
67

@@ -30,7 +31,7 @@ fn setup(
3031
commands.spawn((
3132
PbrBundle {
3233
mesh: meshes.add(Cuboid::new(1.0, 1.0, 1.0)),
33-
material: materials.add(Color::GREEN),
34+
material: materials.add(Color::from(LIME)),
3435
transform: Transform::from_translation(Vec3::new(0.0, 0.0, 0.0)),
3536
..default()
3637
},

examples/bevy/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mod scene;
1515

1616
fn main() {
1717
App::new()
18-
.insert_resource(ClearColor(Color::rgb_u8(20, 20, 20)))
18+
.insert_resource(ClearColor(Color::srgb_u8(20, 20, 20)))
1919
.add_plugins(DefaultPlugins.set(WindowPlugin {
2020
primary_window: Some(Window {
2121
title: "transform-gizmo-demo".into(),

examples/bevy/src/scene.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use bevy::color::palettes::css::{BLUE, LIME, RED};
12
use bevy::prelude::*;
23
use bevy_mod_outline::*;
34
use bevy_mod_picking::prelude::*;
@@ -37,7 +38,7 @@ fn setup_scene(
3738

3839
let cube_count: i32 = 3;
3940

40-
let colors = [Color::RED, Color::GREEN, Color::BLUE];
41+
let colors: [Color; 3] = [RED.into(), LIME.into(), BLUE.into()];
4142

4243
for i in 0..cube_count {
4344
commands

0 commit comments

Comments
 (0)