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
You may also find interesting...

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.

Since iOS 14, you can get a human readable localised name for a UIColor, with a very useful property called accessibilityName, that you can use in accessibility attributes like labels or values. How cool is that? https://developer.apple.com/documentation/uikit/uicolor/accessibilityname
@NSSpain has a great history of having amazing accessibility talks in their schedule! “Accessibility in the Real World”, by @Sommer: https://vimeo.com/235317172 “How to build an app for everyone”, by @NovallSwift: https://vimeo.com/362163043 The super fun "Choose your own SwiftUI adventure - 3 Accessibility", by @twostraws and @PinkerStraws: https://vimeo.com/481768105 And, of course, this year's great "Bas: My Accessibility Story", by @basthomas: https://vimeo.com/751176747