clr_blidness_helper 0.0.1 copy "clr_blidness_helper: ^0.0.1" to clipboard
clr_blidness_helper: ^0.0.1 copied to clipboard

This package helps to adapt colors on the screen for people with color blindness

clr_blindness_helper #

This is the Color Blindness Helper. The main purpose of this package is to help to adapt colors on the screen for the people with color blindness.

Demo #

Alt Text

Getting Started #

To start working with package you should import 3 main parts:

- filter_decorator

- filter_manager

- filter_mode

How to use the package #

To initialize all filters you should create FilterManager() at any part of project (see example for detailed code). The FilterManager is the Singleton, so you can call constructor anywhere and will get the same instance.

To show the package, where are the colors to adapt, you have to use FilterDecorator (see example). FilterDecorator connects to FilterManager and converts your colors when it needed.

To switch filters you have to change mode of FilterManage (see example). filterManage.filterMode = 'Here you put the instance of filter'.

Currently available filters:

- NoFilter() - disable filter

- RedFilter() - filter for people with protanopia (cannot see red).

- GreenFilter() - filter for people with deuteranopia (cannot see green).

Simple code #

class _MyHomePageState extends State<MyHomePage> {
// Here we init the filter manager.
FilterManager filterManager = FilterManager();
// change filter mode
filterManager.filtermode = RedFilter();

@override
Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
            title: const Text('Test Color Blindness'),
            // here we connect color to decorator
            backgroundColor: FilterDecorator(Colors.amber, filterManager)),
        body: SomeWidget()

How it works? #

Filters help to avoid "dangerous" combinations of colors. For example for people with protanopia such combinations are red&green, red&brown. To help people with color blindness see the difference between colors, filters make the difference on the colors that are visible. Example: if person does not see red color, then filter will convert it to the visible spectre (blue/green).

3
likes
140
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

This package helps to adapt colors on the screen for people with color blindness

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface

More

Packages that depend on clr_blidness_helper