@ginden/blinkstick-v2
Version:
Improved Blickstick API for Node.js
24 lines • 888 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRandomColor = getRandomColor;
exports.getRandomColorTuple = getRandomColorTuple;
const random_int_inclusive_1 = require("../random-int-inclusive");
/**
* @summary Gets a random RGB color object.
* @category Utils
*/
function getRandomColor() {
return {
r: (0, random_int_inclusive_1.randomIntInclusive)(0, 255),
g: (0, random_int_inclusive_1.randomIntInclusive)(0, 255),
b: (0, random_int_inclusive_1.randomIntInclusive)(0, 255),
};
}
/**
* @summary Gets a random RGB color tuple.
* @category Utils
*/
function getRandomColorTuple() {
return [(0, random_int_inclusive_1.randomIntInclusive)(0, 255), (0, random_int_inclusive_1.randomIntInclusive)(0, 255), (0, random_int_inclusive_1.randomIntInclusive)(0, 255)];
}
//# sourceMappingURL=get-random-color.js.map