Viewing version 0.3.0. Open the latest package page.
material_color_utilities
0.3.0Algorithms and utilities that power the Material Design 3 color system, including choosing theme colors from images and creating tones of colors; all in a new color space.
Readme
material_color_utilities
Algorithms and utilities that power the Material Design 3 color system, including choosing theme colors from images and creating tones of colors; all in a new color space.
This is a low-level package. For developers looking to adopt Material 3 features such as dynamic color and color harmonization in their apps, please see the dynamic_color package.
Getting started
dart pub add material_color_utilities or flutter pub add material_color_utilities
Usage
import 'package:material_color_utilities/material_color_utilities.dart';
For more information, see the main README.
Contributing
This repo is not accepting external contributions, but feature requests and bug reports are welcome on GitHub.
Changelog
0.3.0 - 2023-03-10
Added
- Add 4 new components:
contrast: UseContrastfor utility methodsdislike: UseDislikeAnalyzerfor checking and fixing universally disliked colorsdynamiccolor: UseDynamicColorandMaterialDynamicColorsfor colors from aDynamicScheme, that adjust based on UI state (dark theme, style, preferences, contrast requirements, etc.)temperature: UseTemperatureCachefor analogous & complementary colors
scheme: AddDynamicSchemeand its subclasses:SchemeExpressiveSchemeMonochromeSchemeNeutralSchemeTonalSpotSchemeVibrantSchemeFidelitySchemeContent
hct: AddinViewingConditionstohct, for color relativityutilities: AddlstarFromYmethod, utility to which is the inverse ofyFromLstar
Changed
- Export all public API in
material_color_utilities.dart - Bump minimum Flutter SDK version to
2.17.0
Fixed
- Fix missing
hashCodeoverride forHct - Fix
TonalPaletteequality operator when different constructors are used (#56)
0.2.0 - 2022-08-05
Added
- Add support for content color
- Add
outlineVariantandscrimcolors
Changed
- Rename
CamSolvertoHctSolver
Fixed
- Correct
repositoryin pubspec
0.1.5 - 2022-04-25
Added
- Introduce
CamSolver, a fast solver for the HCT equation. Highly performant, but a small breaking change - Add explanation and link to
dynamic_colorpackages - Add
operator ==andtoStringoverrides toHct
Changed
- Improve documentation for
color_utils.dart - Rename
HctColortoHct
Fixed
- Fix README import
0.1.4 - 2022-01-21
Added
- Allow creation of
Schemefrom aCorePalettewithlightFromCorePaletteanddarkFromCorePalette
0.1.3 - 2021-12-10
Added
- Export
Scheme
0.1.2 - 2021-12-02
Changed
- Update
Schemetonal values - Move
matcherto pubspec'sdev_dependencies
0.1.1 - 2021-10-28
Changed
- Update pubspec
description
Fixed
- Fix
matcherversion incompatibility with flutter stable
0.1.0 - 2021-10-28
Added
- Create library
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'material_color_utilities:0.3.0'pubspec.yaml
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: material_color_utilities
description: Algorithms and utilities that power the Material Design 3 color system, including choosing theme colors from images and creating tones of colors; all in a new color space.
version: 0.3.0
repository: https://github.com/material-foundation/material-color-utilities/tree/main/dart
issue_tracker: https://github.com/material-foundation/material-color-utilities/issues
screenshots:
- description: "App showing the Material You color system."
path: screenshots/material_you_1.png
- description: "App showing the Material You color system."
path: screenshots/material_you_2.png
- description: "App showing the Material You color system."
path: screenshots/material_you_3.png
- description: "App showing the Material You color system."
path: screenshots/material_you_4.png
environment:
sdk: ">=2.17.0 <4.0.0"
dependencies:
collection: ^1.15.0 # used by tonal_palette.dart
dev_dependencies:
matcher: ^0.12.0 # used by color_matcher.dart
lints: ^2.0.1
test: ^1.16.0
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | Cached · Upstream SHA-256 matched | Download | eb205bd0…3b5af5 |
| 0.1.1 | Cached · Upstream SHA-256 matched | Download | a70544ba…bd21b6 |
| 0.1.2 | Cached · Upstream SHA-256 matched | Download | 57f0c599…58dd58 |
| 0.1.3 | Cached · Upstream SHA-256 matched | Download | 08a930be…45ac1b |
| 0.1.4 | Cached · Upstream SHA-256 matched | Download | c439ea29…bf160f |
| 0.1.5 | Cached · Upstream SHA-256 matched | Download | 3e44388c…45d98b |
| 0.2.0 | Cached · Upstream SHA-256 matched | Download | d92141dc…8cf724 |
| 0.3.0 | Cached · Upstream SHA-256 matched | Download | 586678f2…de9bdb |
| 0.4.0 | Cached · Upstream SHA-256 matched | Download | 28caca2b…4c8ae8 |
| 0.5.0 | Cached · Upstream SHA-256 matched | Download | 9528f2f2…203d41 |
| 0.6.0 | Cached · Upstream SHA-256 matched | Download | 8c706610…3f2466 |
| 0.7.0 | Cached · Upstream SHA-256 matched | Download | fe275c8e…2e4510 |
| 0.8.0 | Cached · Upstream SHA-256 matched | Download | 0e0a0200…a74e5a |
| 0.9.0 | Cached · Upstream SHA-256 matched | Download | 8289611b…ef804d |
| 0.10.0 | Cached · Upstream SHA-256 matched | Download | eebdbb09…962861 |
| 0.11.0 | Cached · Upstream SHA-256 matched | Download | b0292aef…8d6bff |
| 0.11.1 | Cached · Upstream SHA-256 matched | Download | f7142bb1…56bdec |
| 0.12.0 | Cached · Upstream SHA-256 matched | Download | afaac3eb…d9aa79 |
| 0.13.0 | Cached · Upstream SHA-256 matched | Download | 9c337007…e4c48b |
| 0.13.1 | Cached · Upstream SHA-256 matched | Download | cda64b65…7133d0 |
Dependencies
collection "^1.15.0"