AccessibilitySnapshotColorBlindness

1.0.0

Colour blindness simulation and testing for iOS
Sherlouk/AccessibilitySnapshotColorBlindness

What's New

Initial Release

2021-04-26T10:06:55Z

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.

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

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

Last updated: Sat Mar 16 2024 21:08:53 GMT-0900 (Hawaii-Aleutian Daylight Time)