Yep, you got it on both things.
The math is easy. Since black in numbers term is zero, then where it’s black it’s off. White is 1 so that means there’s white it’s on.
Zero (0)= Off
One (1)= On
In other words…
Black in RGB is 0 (off)
White in RGB is 1 (on)
And again for the cookie, the alpha being transparent it lets light through.