Algorithms and utilities that power the Material Design 3 (M3) color system, including choosing theme colors from images and creating tones of colors; all in a new color space.
This package is unpublished, meaning it is impossible to get it from pub.dev hosted registry. To learn how to use this package, see Getting started.
This package is a maintained but unpublished version of the hosted material_color_utilities package. If the same name was used for this package, a naming conflict would occur when publishing to pub.dev. Choosing an alternative name is not a good option, since it locks the consumers of this package to an external dependency alongside the original package.
Based on the aforementioned issues it is recommended to store the source code of this package inside of the source code of a depending project. The name of the package is up the consumer to choose.
The process of integrating this package into your project differs based on whether Pub workspaces are being used or not.
-
Create a new workspace package using
dart create --template=package material_color_utilities. Note that you can use any directory name. -
Change the
namefield inmaterial_color_utilities/pubspec.yamlto your liking (do not usematerial_color_utilities, as it will conflict with the original package). Setresolution: workspaceandpublish_to: none. In this example, themcuname will be used:name: mcu publish_to: none resolution: workspace
-
Add the package to the parent workspace:
workspace: - material_color_utilities # Relative path to the workspace package
-
Remove unneeded files and directories, such as:
README.md,CHANGELOG.md,test,lib, etc. -
Clone or download this repository.
-
Copy the
libfolder from this repository into the workspace package. -
Add the workspace package to your project's dependencies as a Path package:
dependencies: mcu: path: ../material_color_utilities # Relative path to the workspace package
-
Now you can import the package in your code, such as:
import 'package:mcu/material_color_utilities.dart';
Let's assume that your project's package is named my_app.
-
Clone or download this repository:
git clone https://github.com/deminearchiver/material-color-utilities-dart.git
-
Create a folder with name of your choice anywhere inside the
libdirectory of your project (for this example, we will usemcuand place it directly inside oflib):my_app/lib/mcu. -
Copy the contents of the
libdirectory of this repository into themcufolder. -
Now, you can import the package, such as:
import 'package:my_app/mcu/material_color_utilities.dart`;
Color is a powerful design tool and part of the Material system along with styles like typography and shape. In products, colors and the way they are used can be vast and varied. An app’s color scheme can express brand and style. Semantic colors can communicate meaning. And color contrast control supports visual accessibility.
In many design systems of the past, designers manually picked app colors to support the necessary range of color applications and use cases. Material 3 introduces a dynamic color system, which does not rely on hand-picked colors. Instead, it uses color algorithms to generate beautiful, accessible color schemes based on dynamic inputs like a user’s wallpaper. This enables greater flexibility, personalization, and expression, all while streamlining work for designers and teams.
Material Color Ultilities (MCU) powers dynamic color with a set of color libraries containing algorithms and utilities that make it easier for you to develop color themes and schemes in your app.
materialyou.mp4
The library consists of various components, each having its own folder and tests, designed to be as self-contained as possible. This enables seamless integration of subsets into other libraries, like Material Design Components and Android System UI. Some consumers do not require all components, for example, MDC doesn’t need quantization, scoring, image extraction.