UNPKG
pixel-utils
Version:
latest (0.9.0)
0.9.0
0.8.0
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.1
0.2.0
0.1.0
0.0.3
0.0.2
Utility Functions for Pixels
github.com/DanielJDufour/pixel-utils
DanielJDufour/pixel-utils
pixel-utils
/
dist
/
esm
/
is-hidden
/
index.js
8 lines
•
252 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
/** *
@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 */
export
default
function
isHidden
(
pixel
) {
return
pixel[
3
] ===
0
; }