pub repository
mirror.p-hatan.irmaterial_color_utilities
0.13.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.13.0 - 2025-05-20
- All of the
MaterialDynamicColorsfields are now final. - Require Dart 3.5
0.12.0 - 2024-06-06
Changed
- Updated
MaterialDynamicColorsto use the expressive on-colors spec.
0.11.2 - 2024-04-30
Changed
- Updated
TonalPaletteto use new key color algorithm.
0.11.1 - 2024-03-11
Fixed
- Fixed Apache license
0.11.0 - 2024-02-20
Changed
- Updated
TonalPalette.fromListso that it provides colors at any tone, not only atcommonTones.
0.10.0 - 2023-11-27
Changed
- Updated
MaterialDynamicColorsto new Contrast Surfaces spec.
0.9.0 - 2023-11-06
Added
- Added getters for
DynamicScheme.
Changed
- Moved
DynamicSchemefromscheme/todynamiccolor/.
0.8.0 - 2023-06-22
Added
- Add fruit salad color scheme
- Add rainbow color scheme
0.7.0 - 2023-06-13
Changed
- Updated
DynamicColorso that it conforms to the new contrast requirements.- API for
DynamicColormodified.
- API for
0.6.0 - 2023-05-31
Added
- Add key color to tonal palette.
- Add key colors to the Material dynamic colors:
primaryPaletteKeyColorsecondaryPaletteKeyColortertiaryPaletteKeyColorneutralPaletteKeyColorneutralVariantPaletteKeyColor
Changed
- Scheme updates to align with recent Android Sys UI changes:
SchemeExpressive:- Primary hue + 240 from 120
- Neutral hue + 15
- Neutral variant hue + 15
SchemeTonalSpot:- Primary chroma = 36 from 40
SchemeVibrant:- Neutral chroma = 10 from 8
Fixed
- Fixed outline when in dark mode to be tone 60.
0.5.0 - 2023-05-02
Removed
- Removed
inverseOnPrimary, an unfounded dynamic color
0.4.0 - 2023-04-28
Added
- Add
labelanddescriptionto eachVariant - Add
xFixedMaterial dynamic colors
Changed
- Update monochrome scheme to new spec
Fixed
- Fix
inverseSurfacetone value
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.ir
flutter pub add material_color_utilitiespubspec.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.13.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: ^3.5.0
dependencies:
collection: ^1.15.0 # used by tonal_palette.dart
dev_dependencies:
dart_flutter_team_lints: ^3.0.0
matcher: ^0.12.0 # used by color_matcher.dart
test: ^1.16.0
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | 2021-10-28T14:39:42.858732Z | Download | eb205bd0d00f34c492a15ab3332bd4eb3141322a77d4c2ad2e10861ecf3b5af5 |
| 0.1.1 | 2021-10-28T16:05:17.476202Z | Download | a70544bad230b724b5536c5ed2955d14e71e83de289126e4fb4bac9d1dbd21b6 |
| 0.1.2 | 2021-12-02T14:57:25.214933Z | Download | 57f0c5997cdb339e2f00e7408710275c5bb3661daaee8467ff9862f9d258dd58 |
| 0.1.3 | 2021-12-10T12:04:21.996609Z | Download | 08a930be3079071b6024191d7a597326c11b1f62e1c65de2fe1cb7654845ac1b |
| 0.1.4 | 2022-01-21T17:40:48.050965Z | Download | c439ea29c3596283975647da36038c3a842a464535888df1a812b422f0bf160f |
| 0.1.5 | 2022-04-25T12:28:53.761088Z | Download | 3e44388ce13d4d9a393e6b93dce4b958160edd02d38a552a3a0a0f38c445d98b |
| 0.2.0 | 2022-08-05T17:19:08.486011Z | Download | d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 |
| 0.3.0 | 2023-03-13T15:49:06.675925Z | Download | 586678f20e112219ed0f73215f01bcdf1d769824ba2ebae45ad918a9bfde9bdb |
| 0.4.0 | 2023-05-03T10:23:13.616288Z | Download | 28caca2b8f832e7b6836e55dcdb49bbecb552a25032dd8cbde9aa291484c8ae8 |
| 0.5.0 | 2023-05-03T10:24:11.011335Z | Download | 9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41 |
| 0.6.0 | 2023-06-16T10:48:42.608465Z | Download | 8c706610e4726f95d7b6fbe00d10918c8633e7eb6f76d3d29fa7da7bc93f2466 |
| 0.7.0 | 2023-06-22T10:19:05.524565Z | Download | fe275c8e3fbd40b8e46fa93e84951e8eee3721b6b28e199b577c6188c22e4510 |
| 0.8.0 | 2023-06-29T10:01:17.966113Z | Download | 0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a |
| 0.9.0 | 2024-03-11T16:39:04.238387Z | Download | 8289611b8b7641397a412901596a9e041f4df2201714160fc0b54d936def804d |
| 0.10.0 | 2024-03-11T16:39:38.807516Z | Download | eebdbb0980a944fa1e1b74977c956652641aff8df2aae5e2e80ab16da4962861 |
| 0.11.0 | 2024-03-11T16:39:51.174799Z | Download | b0292aef430a1ffff816c83e7d63332a0a4df72b818466a49dc7fc3ab38d6bff |
| 0.11.1 | 2024-03-13T16:06:28.166042Z | Download | f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec |
| 0.12.0 | 2024-06-06T16:30:43.736723Z | Download | afaac3ebbf67448ab81c891b8e1f2f4d3e7bc19aa36d269c0257b54bc0d9aa79 |
| 0.13.0 | 2025-06-04T16:40:01.638488Z | Download | 9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b |
| 0.13.1 | 2026-08-10T14:58:12.420872Z | Download | cda64b65529b9737e5c9bf7ef386c907f2a58707039a3033788030da927133d0 |
Dependencies
collection "^1.15.0"