pixel-utils
Version:
Utility Functions for Pixels
14 lines (13 loc) • 345 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isHidden;
/**
* @description check if an RGBA pixel is hidden
* @param {number[]} pixel - an array of 4 numbers representing [R, G, B, A]
* @returns {boolean} whether the pixel is hidden
*/
function isHidden(pixel) {
return pixel[3] === 0;
}