The refraction of dark solitons at a planar boundary separating two defocusing Kerr media is simulated and analyzed, for the first time (to our knowledge). Analysis is based on the nonlinear Helmholtz equation and is thus valid for any angle of incidence. A new law, governing refraction of black solitons, is combined with one describing bright soliton refraction to yield a generalized Snell’s law whose validity is verified numerically. The complexity of gray soliton refraction is also analyzed, and illustrated by a change from external to internal refraction on varying the soliton contrast parameter