razer-chroma-nodejs v1.3.2
Razer Chroma Node.js
Razer Chroma Node.js allows you to control the lights on Razer Chroma devices using node.js
Installation
Use the package manager npm to install Razer Chroma node.js.
npm install razer-chroma-nodejsUsage
Example
const Chroma = require("razer-chroma-nodejs");
// Initialize Chroma
Chroma.util.init(() => {
console.log("Chroma Editing Started");
// Set the mouse color to green
Chroma.effects.mouse.setColor(Chroma.colors.GREEN);
// Close Chroma after 5 seconds
setTimeout(() => {
Chroma.util.close(() => {
console.log("Chroma Editing Stopped");
});
}, 5000);
});Initialize & Close
Chroma.util.init(callback); Must be called to do anything with Chroma, Chroma is ready when callback is called.
Chroma.util.close(callback); Must be called to close Chroma. Chroma is closed when callback is called.
Effects
Colors
Chroma.colorsList of pre defined ColorsChroma.colors.rgb(r, g, b)Use an RGB color
Devices
Chroma.effects.mouseMouse specific effectsChroma.effects.mousepadMousepad specific effectsChroma.effects.headsetHeadset specific effectsChroma.effects.keyboardKeyboard specific effectsChroma.effects.keypadKeypad specific effectsChroma.effects.chromalinkChromalink specific effectsChroma.effects.allEffects for all devices
All Devices:
.setColor(color)Change static color.cycleSpectrum()Cycle through the color spectrum. This is looped and needs to be cleared.off()Turn the lights off.clear()Clear non-static effects
Mousepad:
.wave(direction)Create a wave effect around the mousepad (0 or 1 for direction). This is looped and needs to be cleared
Keyboard:
gamingSets WASD & arrow keys as white, turns off all other lightsrandomRandomizes every key's color. This is looped and needs to be cleared
License
4 years ago
4 years ago
4 years ago
4 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago