We present spectroscopic data on the electronic structure of YbS under pressure. From resonant x-ray emission and x-ray absorption spectra in the high-resolution partial fluorescence yield mode, we find that the Yb valence increases from 2.3 at ambient pressure to 2.6 at 360 kbar. The accuracy of these estimates is enhanced by a combined analysis of emission spectra measured as a function of the incident and emitted energy. The spectral line shapes reflect the mixed character of the electronic states, intermediate between atomic and bandlike.