RavenRS · Rust GUI

ColorWheel

Edit and run the ColorWheel RavenRS example in your browser. Explore its Rust code and download a Cargo project for desktop and WebAssembly.

One declarative Rust interface, GPU rendering, reactive state and semantic design tokens. Free and open source under MIT OR Apache-2.0.

Rust source

fn color_wheel() -> impl View {
    let tint = State::new(HueSaturation::new(30.0, 0.4));
    let shown = tint.clone();
    HStack::new((
        ColorWheel::new(tint.binding()).diameter(160.0).label("Shadows"),
        Text::bound(&shown, |v| format!("{:.0}°, {:.0}%", v.hue, v.saturation * 100.0))
            .style(TextStyle::Callout)
            .foreground(Semantic::InkMuted),
    ))
    .spacing(16.0)
}

The interactive preview loads when JavaScript and WebGPU or WebGL2 are available. You can read the guide and examples here at any time.

More examples