//! Shows how to set the solid color that is used to paint the window before the frame gets drawn.1//!2//! Acts as background color, since pixels that are not drawn in a frame remain unchanged.34use bevy::{color::palettes::css::PURPLE, prelude::*};56fn main() {7App::new()8.insert_resource(ClearColor(Color::srgb(0.5, 0.5, 0.9)))9.add_plugins(DefaultPlugins)10.add_systems(Startup, setup)11.add_systems(Update, change_clear_color)12.run();13}1415fn setup(mut commands: Commands) {16commands.spawn(Camera2d);17}1819fn change_clear_color(input: Res<ButtonInput<KeyCode>>, mut clear_color: ResMut<ClearColor>) {20if input.just_pressed(KeyCode::Space) {21clear_color.0 = PURPLE.into();22}23}242526