Giter Club home page Giter Club logo

ebraminio / material-dynamic-color-flutter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from material-foundation/material-dynamic-color-flutter

0.0 2.0 0.0 12.44 MB

A Flutter package to obtain dynamic colors on Android S+ and create harmonized color schemes

Home Page: https://pub.dev/packages/dynamic_color

License: BSD 3-Clause "New" or "Revised" License

JavaScript 97.26% Ruby 0.14% Objective-C 0.01% Kotlin 0.36% Dart 1.74% Swift 0.06% HTML 0.43%

material-dynamic-color-flutter's Introduction

dynamic_color

pub package

A Flutter package to obtain dynamic colors on Android S+ and create harmonized color schemes.

Learn more about dynamic color, custom colors and harmonization on the Material 3 site.

Features

Builder widget

For convenience, this package includes DynamicColorBuilder, a stateful widget that provides the device's dynamic colors in a light and dark ColorScheme.

Plugin

Under the hood, DynamicColorBuilder uses a plugin to talk to the Android OS.

Color and color scheme harmonization

How do we ensure any particular color (i.e. semantic/custom color) looks good next to a user's dynamically-generated color?

This package provides two extension methods, Color.harmonizeWith() and ColorScheme.harmonized() to accomplish this.

Color.harmonizeWith() shift the hue of the color towards the passed in color, typically colorScheme.primary. This leaves the color recognizable while harmonizing it.

ColorScheme.harmonized() does the same thing, for ColorScheme's built-in semantic colors. See harmonization.dart for more.

Getting started

flutter pub add dynamic_color

import 'package:dynamic_color/dynamic_color.dart';

Usage

See this complete example for obtaining dynamic colors, creating harmonized color schemes, and harmonizing custom colors.

All examples are hosted on GitHub and can be run with:

cd example
flutter run

Development

The hosted examples can be updated with:

cd example
flutter build web

material-dynamic-color-flutter's People

Contributors

guidezpl avatar dpatrongomez avatar willlarche avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.