Day 167

Calculate color contrast in Inspector

1 Nov 2022

There is a Color Contrast Calculator conveniently built into the Accessibility Inspector. Find it in Window, in the top menu. Select two colors for text and background and check if it passes for all text sizes or just some of the largest ones.

With the Accessibility Inspector open, select Window in the top menu, and then Show Color Contrast Calculator. It will open on a separate window. Two colors can be selected for text and background in a few ways, like specifying RGB or Hex values. You can then move the text size slider to find out if it passes for all the text sizes or just some of the largest sizes.

Some of you have asked me how you can support what I do. This would really help, and would be hugely appreciated:

  • Find these posts useful? Share them at work, on social media, or with anyone that might find them interesting. Let's spread the word!

  • Check out any of my apps or games: Xarra!, RetroRapid!, or Mestre!.

    • A download and a review go a long way. They're free by default. On the App Store, ratings and reviews really help more people discover them.

    • Finding any of them useful? If so, and if you can afford it, purchasing lifetime access to all features or subscribing lets me buy the coffee that keeps me caffeinated. Caffeine keeps me going to maintain the apps, bring in new features that I hope you'll love, and keep writing.

You may also find interesting...

The Accessibility Inspector let’s you run an audit of the current screen in your simulator or device. It can find some basic issues like color contrast issues, touch target sizes that are too small, etc. It can also provide with fix suggestions.

If you are using SwiftUI to build your apps, there is a fairly basic but very useful Accessibility Inspector built right there in the Inspectors Panel, on the right side of Xcode.

Xcode has a built-in tool to help you develop more accessible apps, the Accessibility Inspector. You can find it in the Developer Tool set in the Xcode menu. It has three main functionalities: inspect, audit and settings.


Content © Daniel Devesa Derksen-Staats on Accessibility up to 11! is licensed under CC BY 4.0. License details