fn to_color(color: &str, opacity: u8) -> Option<Color> {
    if let Ok(Paint::Color(svgtypes::Color { red, green, blue })) = Paint::from_str(color) {
        Some(Color::rgba_u8(red as u8, green as u8, blue as u8, opacity))
    } else {
        None
    }
}
/// Helper function that transforms from str to svgtypes' Color to bevy's Color
Helper function that transforms from str to svgtypes' Color to bevy's Color
Helper function that transforms from str to svgtypes ' Color to bevy ' s Color
fn to_color(color: &str, opacity: u8) -> Option<Color> {
    if let Ok(Paint::Color(svgtypes::Color { red, green, blue })) = Paint::from_str(color) {
        Some(Color::rgba_u8(red as u8, green as u8, blue as u8, opacity))
    } else {
        None
    }
}
fn to_color ( color : & str , opacity : u8 ) -> Option < Color > { if let Ok ( Paint :: Color ( svgtypes :: Color { red , green , blue } ) ) = Paint :: from_str ( color ) { Some ( Color :: rgba_u8 ( red as u8 , green as u8 , blue as u8 , opacity ) ) } else { None } }
Helper function that transforms from str to svgtypes' Color to bevy's Color
Helper function that transforms from str to svgtypes ' Color to bevy ' s Color
color
&str
opacity
u8
color
&str
opacity
u8