#sdk #safe #chroma #razer #api #effect #color

razer_chroma

The razer_chroma crate provides Razer Chroma SDK functionality in a safe and simple API

1 unstable release

0.1.0 May 16, 2019

#3 in #razer

MIT license

16KB
321 lines

razer-chroma-rs

The razer_chroma crate provides Razer Chroma SDK functionality in a safe and simple API.

You can initialize the SDK like so:

let sdk = match razer_chroma::SDK::new() {
    Some(sdk) => sdk,
    None => { warn!("razer drivers not installed or supported"); return },
}

Once you have the SDK instance, you can create and activate effects like so:

let effect = sdk.create_keyboard_effect(razer_chroma::KeyboardEffect::Static{
    color: razer_chroma::Color::from_rgb(0, 0, 255),
})?;
sdk.set_effect(&effect)?;

Dependencies

~0–2MB
~41K SLoC