The German Association for the Blind and Visually Impaired offers an online tool for calculating contrast with comprehensive explanations. Besides RGB and CMYK, the 360 colour systems of the Open Color Systems Collection can also be selected.
To enable visually impaired and colour-impaired people to access websites, sufficient brightness contrast is also important in addition to font sizes - at legible.info both can be checked.