Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The validValues read-only property of the PreferenceObject interface returns a read-only array of values that are accepted by the override.
An array containing the valid values to override the PreferenceObject value with.
This example demonstrates how to log all possible contrast values.
console.log(navigator.preferences.contrast.validValues);