  We demonstrate that the cubic antifluorite-type halides K$_2$OsCl$_6$,
K$_2$OsBr$_6$, and Rb$_2$OsBr$_6$ are excellent realizations of non-magnetic
J=0 compounds. The magnetic susceptibility shows the corresponding Van-Vleck
type behavior and no sign of defects. We investigate the electronic excitations
with two complementary techniques, resonant inelastic x-ray scattering (RIXS)
and optical spectroscopy. This powerful combination allows us to thoroughly
study, e.g., on-site intra-$t_{2g}$ excitations and $t_{2g}$-to-$e_g$
excitations as well as inter-site excitations across the Mott gap and an
exciton below the gap. In this way, we determine the electronic parameters with
high accuracy, altogether yielding a comprehensive picture. In K$_2$OsCl$_6$,
we find the spin-orbit coupling constant $\zeta$=0.34 eV, Hund's coupling
$J_H$=0.43 eV, the onset of excitations across the Mott gap at $\Delta$=2.2 eV,
the cubic crystal-field splitting 10Dq=3.3 eV, and the charge-transfer energy
$\Delta_{CT}$=4.6 eV. With $J_H/\zeta$=1.3, K$_2$OsCl$_6$ is in the
intermediate-coupling regime. In a $t_{2g}$-only Kanamori picture, the above
values correspond to $\zeta^{eff}$=0.41 eV and $J_H^{eff}$=0.28 eV, which is
very close to results reported for related $5d^4$ iridates. In the tetragonal
phase at 5 K, the non-cubic crystal field causes a peak splitting of the J=1
state as small as 4 meV. Compared to K$_2$OsCl$_6$, the bromides K$_2$OsBr$_6$
and Rb$_2$OsBr$_6$ show about 12-14 % smaller values of 10Dq and $\Delta_{CT}$,
while the spin-orbit-entangled intra-$t_{2g}$ excitations below 2 eV and hence
$\zeta$ and $J_H$ are reduced by less than 4 %. Furthermore, the Mott gap in
K$_2$OsBr$_6$ is reduced to about 1.8 eV.
