All Projects → Sherlouk → AccessibilitySnapshotColorBlindness

Sherlouk / AccessibilitySnapshotColorBlindness

Licence: MIT license
Colour blindness simulation and testing for iOS

Programming Languages

swift
15916 projects

Color Deficiency Snapshot Tests

This package makes it easier for you to understand the implications of your app's design on users with various types of color blindness.

It adds functionality to SnapshotTesting which allows you to generate images of your UIViews, UIViewControllers and UIImages with multiple color blindness filters over the top simulating what it looks like to users with different types of vision deficiencies.

Image demonstrating the different types of colour blindness

Usage

// 1. Import
import AccessibilitySnapshotColorBlindness

// 2. Create UIView, UIViewController or UIImage.
let systemUnderTest = // ... your code

// 3. Assert Snapshot
assertSnapshot(matching: image, as: .image_colourBlindness(type: .protanopia))

You may wish to use MatrixTypes.allCases to snapshot all variations of your view. You can see an example of this in our tests.

Shoutouts

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].