color_blindness
0.3.1, released 5 days ago by an unverified publisher
Simulate color blindness across Material 3 color schemes or individual colors in Flutter.
What it does
It simulates eight color vision deficiencies (such as deuteranopia, protanopia, and tritanopia) on individual colors or complete Material 3 color schemes. It also calculates color contrast ratios and checks contrast issues to audit accessibility.
AI-written summary of version 0.3.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to audit your app's Material 3 theme and colors for accessibility against color blindness.
- You want to preview how your UI looks under different color vision deficiencies.
Skip it when
- You require rigorous physiological LMS cone-space simulations (like Brettel or Machado models) instead of lightweight 3x3 RGB matrix approximations.
Strengths
- Supports eight distinct color vision deficiencies.
- Works directly with Material 3 ColorSchemes and individual Flutter Colors.
- Includes built-in contrast ratio checking and accessibility auditing tools.
Weaknesses
- Uses lightweight sRGB matrix approximations rather than physiological cone-space modeling.
- Limited to color simulation and contrast checking utilities.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
No native setup or permissions required. Simply add the dependency and import the package.
ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: const Color(0xFF006C51),
).simulateColorBlindness(ColorBlindnessType.deuteranopia),
)Alternatives
Packages that do the same job and could replace color_blindness.
- flutter_color
Flutter plugin for working with color schemes like hex, hsl, xyz, and cielab.
82Compare - dynamic_color
Create Material color schemes based on a platform's implementation of dynamic color.
83Compare - dynamic_system_colors
Create Material color schemes based on the platform's dynamic color implementation.
69Compare - random_color_scheme
Generates random light and dark Material Design color schemes respecting WCAG guidelines.
57Compare
Works with
Packages commonly used together with color_blindness: ones it builds on, ones built on it, and its own family.