Flutter 패키지로 개발자가 애플리케이션 내에서 색맹 효과를 테스트하고 시뮬레이션하는 데 도움을 줍니다. 전역 색상 스키마와 개별 색상 조정을 모두 지원하여 다양한 시각 장애에 걸쳐 접근성을 보장합니다. Flutter의 테마 시스템과 원활하게 통합되어 색각 이상을 가진 사용자가 색상을 어떻게 보는지 실시간으로 시각화할 수 있습니다. 모든 사용자에게 기능적이고 명확한 포괄적인 UI를 만드는 데 이상적입니다.
사용 사례
앱 접근성 테스트
색각 장애 시뮬레이션
색각 장애 사용자를 위한 UI 디자인 개선
테마 일관성 검증
대비 일치 보장
다양한 청중을 위한 사용자 경험 향상
주요 기능
여러 가지 색맹 유형을 지원
Flutter 테마와 통합됩니다
개별 색상 또는 전체 색상 구성 조정
실시간 시뮬레이션
크로스 플랫폼 호환성
pub add를 통한 간편한 통합
적합한 대상
접근성 중심 개발자
UI/UX 디자이너
광범위한 대상 사용자를 겨냥한 플러터 앱
WCAG 준수를 요구하는 앱
포용적 디자인을 우선시하는 팀
개발자들이 시각적 접근성 테스트 중
고려 사항
과도하게 사용할 경우 성능에 영향을 줄 수 있습니다
컨텍스트에서 수동 테스트가 필요합니다
전문적인 접근성 감사의 대체가 아님
시뮬레이션에 한정됨, 보정 불가
개발 단계에서 가장 잘 사용됨
런타임 동작을 변경하지 않습니다
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Color Blindness on Flutter
Every app has colors. How to make sure they are accessible?
How to avoid accessibility issues as other people in the same project start to change the Color Scheme?
This is a Flutter plugin that can:
Change the whole theme, by wrapping a ColorScheme with colorBlindnessColorScheme().
Be used in CI tests, with colorBlindnessAssertContrast().
Be used to modify a single color.
The main idea is for you to (temporarily) wrap your ColorScheme() into a colorBlindnessColorScheme() with a ColorBlindnessType as the secondary parameter.
Doing so, it will simulate color blindness by modifying ALL ColorScheme colors.
Then, you may change the type parameter and hot refresh/restart the app to see how it looks under different eyes.
The interactive sample allows you to see how it works:
Usage
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:color_blindness:^VERSION
Color Scheme
In your project, just wrap the ColorScheme.dark(...) with colorBlindnessColorScheme().
You can add a test to make sure the ColorScheme is always accessible.
The second parameter is the WCAG minimum threshold, which is usually at least 4.5.
This started in my Color Studio project. There, you can preview different color blindness in different themes.
However, I saw the possibility of contribution for those already using ColorScheme in an existing app.
Similar to RandomColorScheme, this may reach deeper places than Color Studio ever will.
Also, there were ZERO packages in pub.dev related to color blindness, so this was the first one.
The color blindness calculation was retrieved from ColorBlinds project.
If you have any suggestions or feedback, issues and pull requests are welcome.
You can report here.
License
Copyright 2020 Bernardo Ferrari
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.