앱 테마를 강화하기 위해 동적 라이트 및 다크 색상 스키마를 생성하는 플러터 패키지입니다. 수동으로 색상을 선택하지 않고도 시각적으로 매력적이고 일관된 테마를 쉽게 만들 수 있습니다. 프로토타이핑 또는 다양한 시각적 스타일을 필요로 하는 앱에 이상적입니다. 이 패키지는 여러 플랫폼을 지원하며 간단한 API를 통해 플러터 프로젝트에 원활하게 통합됩니다. 색상 스키마는 알고리즘적으로 생성되어 배경, 텍스트, 버튼과 같은 UI 요소에 적합한 조화와 대비를 보장합니다.
사용 사례
앱 테마 프로토타이핑
다이내믹 UI 테마
앱에서의 시각적 다양성
빠른 디자인 반복
접근성 중심의 색상 생성
다중 플랫폼 테마 일관성
주요 기능
자동으로 밝고 어두운 색상 테마를 생성합니다
알고리즘 색조화
Flutter와의 간단한 통합
모든 주요 플랫폼을 지원합니다
사용자 정의 가능한 계획 생성
일관된 사용자 인터페이스 미학
적합한 대상
빠른 테마 옵션을 찾는 UI 디자이너
사용자 정의 가능한 앱을 개발하는 개발자
프로토타이핑 도구 및 데모 앱
여러 테마 변형이 필요한 앱
시각적 다양성을 강조하는 프로젝트
고려 사항
생성된 색상은 브랜드 가이드라인을 항상 충족하지 않을 수 있습니다
특정 색조 선택에 대한 제한된 제어
비중요하거나 실험적인 테마에 가장 적합
접근성 준수를 위한 검증이 필요합니다
엄격한 브랜딩 요구 사항에 적합하지 않음
원본 README
연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.
Random Color Scheme
Making a coherent Material Design theme is hard. This is a Flutter plugin that generates a random color pallet based on Material Design while respecting WCAG guidelines.
The idea is for you to (temporarily) replace your ColorScheme() with a randomColorSchemeLight() or randomColorSchemeDark().
On each run, hot refresh or hot restart, the app is going to look different. The theme is printed in terminal, so you can easily copy and paste back into your project with the colors that you want to stay.
The interactive sample allows you to see how it works and the reasoning behind:
Usage
In the pubspec.yaml of your flutter project, add the following dependency:
dependencies:random_color_scheme:^VERSION
In your project, just replace the ColorScheme.dark(...) with randomColorSchemeDark().
If you want a light theme, there is a randomColorSchemeLight().
This started in my Color Studio project.
I started looking at the Material Design Guidelines on color for both light and dark theme.
After extracting some colors (like the Primary, Secondary and Owl Study), I decided to see how similar were they, in what range are they and how they behave together.
Then, I used HSLuv with a random number generator and rules detected from my observation. The final adjustments were made when tweaking the sample.
HSLuv is great because only the Lightness attribute affects WCAG calculated contrast, so all themes are guaranteed to pass
a minimum accessibility threshold.
Seed: an integer which guarantees the random function is always going to have the same output (i.e., the same ColorScheme).
It is optional.
Reporting Issues
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.