The pigmentation of the eye isn’t restricted to the iris. The interior wall of the eye is also pigmented. In fair eyes, there is much less pigmentation than in both the iris and the eye wall; in dark eyes both the iris and the eye wall are more pigmented. That pigment is always brown, no matter what color the iris appears. Any blue tone (including the blue component of green eyes) is not caused by pigmentation, but by a light-scattering effect. That light scattering happens just as much in a brown iris, but it’s masked by the heavy pigmentation.
As @Grisson said, both the iris and the eye wall transmit some light (the wall more than the iris). But the heavier the pigmentation, the less light gets through. The light that does get through is also largely skewed towards the red end of the spectrum because of the blood supply in the eye wall.
Optomologists call the unfocused light that enters the eye through the iris and wall the “homogenous veil”, because it creates a kind of light fog in the eye (this also includes light that’s reflected from the surface of the retina back toward the eye wall and bounces around a bit). In light blue eyes with a 4mm pupil diameter exposed to red light, about 17% of the light in the eye will be homogenous veil. If exposed to green light, only about 5% will be homogenous veil. In heavily pigmented eyes, the transmission can be 100 times less. (study)