Sometimes it won't be enough to make colors darker or lighter for Increase Contrast. As always, it is important to do some testing. The same colors might be used with different backgrounds or text colors and the contrast could actually get worse.

The stock app with Increase Contrast off. Values going up are in white over green with a contrast of 2.2 to 1 that fails. The widget on the other hand has green over black, being the contrast ratio of 9 to 1 and it passes. When turning Increase Contrast on, the green color goes darker. In the app, it is 7.3 to 1 and now it passes, but in the widget is now 3.7 to 1 and it passes only when the font is at least 19 points in regular or 14 in bold. But the point is that the contrast for the widget is now worse than when Increase Contrast was off.

You may also find interesting...

If you don't use Color Sets in your Asset Catalog, and you define your color palette in code, you can still check if the user has Increase Contrast enabled to offer a slightly different color that improves the contrast ratio even more. Day 192 (2/2). You can check if the darker system colors is enabled: https://developer.apple.com/documentation/uikit/uiaccessibility/isdarkersystemcolorsenabled Listen to a notification in case this setting changes: https://developer.apple.com/documentation/uikit/uiaccessibility/darkersystemcolorsstatusdidchangenotification And also check if the accessibility contrast is high in your trait collection: https://developer.apple.com/documentation/uikit/uitraitcollection/accessibilitycontrast

If, for some reason, you are creating a button from scratch, instead of relying on UIButton (perhaps you are adding a fancy micro interaction animation?), take into account that you’ll need to configure the button accessibility trait.

"We have one job, and that's to make our apps work. And if you are not implementing accessibility features, you are forgetting about making it work for a lot of people" @NovallSwift Couldn't have said it better! https://x.com/novallswift/status/1328387659744505856

Created in Swift with Ignite.

Supporting Swift for Swifts