UNPKG

pixel-utils

Version:
17 lines (16 loc) 420 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = sliceAlpha; /** * @name sliceAlpha * @description slices off the alpha value of a 4-number RGBA pixel array, * leaving a new 3-Number RGB pixel array * @param {RGBA} pixel - an RGBA * @returns {RGBA} an RGBA pixel as an array of 4 numbers */ function sliceAlpha(pixel) { // @ts-ignore return pixel.slice(0, 3); }