UNPKG

pixel-utils

Version:
14 lines (13 loc) 347 B
"use strict"; 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]; }