UNPKG

pixel-utils

Version:
11 lines 316 B
/** * @description converts an RGB to an RGBA by pushing an alpha value at the end of the RGB array * @param rgb - a 3-number RGB pixel * @returns rgba - a 4-number array representing an RGBA pixel */ export default function pushAlpha(pixel) { // @ts-ignore pixel.push(255); // @ts-ignore return pixel; }