GitXplorerGitXplorer
S

AccessibilitySnapshotColorBlindness

public
75 stars
3 forks
0 issues

Commits

List of commits on branch main.
Unverified
b89d10fca1c870ea877bd416057c984f866111e9

Add Example to README

SSherlouk committed 4 years ago
Unverified
17c41950ff253e368944d4c067a4fd02ba4d0122

Initial Commit

SSherlouk committed 4 years ago

README

The README file for this repository.

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