setAccessibilityDisplay

suspend fun setAccessibilityDisplay(highContrastText: Boolean? = null, colorInversion: Boolean? = null, boldText: Boolean? = null)(source)

Turns the accessibility display settings on or off until detach, see setAnimations; a null setting is left as it is. highContrastText draws text with an outline in black or white, colorInversion inverts the display's colors (screenshots stay uninverted: the inversion happens in the display pipeline), and boldText makes the system font bold (API 31+, FailureReason.UNSUPPORTED_API below, before anything changes). The values are what Settings › Accessibility writes, read back (FailureReason.DEVICE_SETTING when the device did not take one). Read back with DeviceInfo.highContrastText, DeviceInfo.colorInversion and DeviceInfo.boldText.