pixel-utils
Version:
Utility Functions for Pixels
14 lines (13 loc) • 347 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = addAlpha;
/**
* @description adds an alpha channel to an RGB Pixel, creating a new RGBA pixel
* @param rgb - a 3-number RGB pixel
* @returns rgba - a 4-number array representing an RGBA pixel
*/
function addAlpha(rgb) {
return [...rgb, 255];
}