# material_color_utilities 0.13.1

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.




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add material_color_utilities
```
Published: 2026-08-10T14:58:12.420872Z
Expected archive SHA-256: cda64b65529b9737e5c9bf7ef386c907f2a58707039a3033788030da927133d0

Available in cache; verification: upstream_checksum
## Direct dependencies
- collection: ^1.15.0

## Package README (untrusted upstream documentation)
# material_color_utilities

[![pub package](https://img.shields.io/pub/v/material_color_utilities.svg)](https://pub.dev/packages/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](https://pub.dev/packages/dynamic_color) package.

## Getting started

`dart pub add material_color_utilities` or `flutter pub add material_color_utilities`

## Usage

```dart
import 'package:material_color_utilities/material_color_utilities.dart';
```

For more information, see the main [README](https://github.com/material-foundation/material-color-utilities#readme).

## Contributing

This repo is not accepting external contributions, but feature requests and bug
reports are welcome on
[GitHub](https://github.com/material-foundation/material-color-utilities/issues).

## Changelog
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

## 0.13.1 - 2026-08-10

### Changed

- Use `MathUtils.sanitizeDegreesDouble` for hue value calculation in `Cam16`.


### Fixed

- Fix documentation link for deprecated `Scheme` class.

## 0.13.0 - 2025-05-20

### Changed

- Make all `MaterialDynamicColors` fields `final`.
- Require Dart 3.5.
- Optimize ARGB and HCT color conversions in `DynamicScheme` constructors.
- Unify `errorPalette` parameter handling across `DynamicScheme` constructors.
- Make `Scheme` internal implementation details private.

### Deprecated

- Deprecate legacy `CorePalette` class in favor of `CorePalettes`.

## 0.12.0 - 2024-06-06

### Changed

- Update `MaterialDynamicColors` to use the expressive on-colors spec.

## 0.11.2 - 2024-04-30

### Changed

- Update `TonalPalette` to use new key color algorithm.

## 0.11.1 - 2024-03-11

### Fixed

- Fix Apache license.

## 0.11.0 - 2024-02-20

### Changed

- Update `TonalPalette.fromList` so that it provides colors at any tone, not
  only at `commonTones`.

## 0.10.0 - 2023-11-27

### Changed

- Update `MaterialDynamicColors` to new Contrast Surfaces spec.

## 0.9.0 - 2023-11-06

### Added

- Add getters for `DynamicScheme`.

### Changed

- Move `DynamicScheme` from `scheme/` to `dynamiccolor/`.

## 0.8.0 - 2023-06-22

### Added

- Add fruit salad color scheme.
- Add rainbow color scheme.

## 0.7.0 - 2023-06-13

### Changed

- Update `DynamicColor` to conform to the new contrast requirements.

    - Modify API for `DynamicColor`.

## 0.6.0 - 2023-05-31

### Added

- Add key color to tonal palette.
- Add key colors to the Material dynamic colors:

    - `primaryPaletteKeyColor`
    - `secondaryPaletteKeyColor`
    - `tertiaryPaletteKeyColor`
    - `neutralPaletteKeyColor`
    - `neutralVariantPaletteKeyColor`

### 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

- Fix outline when in dark mode to be tone 60.

## 0.5.0 - 2023-05-02

### Removed

- Remove `inverseOnPrimary`, an unfounded dynamic color.

## 0.4.0 - 2023-04-28

### Added

- Add `label` and `description` to each `Variant`.
- Add `xFixed` Material dynamic colors.

### Changed

- Update monochrome scheme to new spec.

### Fixed

- Fix `inverseSurface` tone value.

## 0.3.0 - 2023-03-10

### Added

- Add 4 new components:
    - `contrast`: Use `Contrast` for utility methods.
    - `dislike`: Use `DislikeAnalyzer` for checking and fixing universally disliked colors.
    - `dynamiccolor`: Use `DynamicColor` and `MaterialDynamicColors` for colors
        from a `DynamicScheme`, that adjust based on UI state
        (dark theme, style, preferences, contrast requirements, etc.)

    - `temperature`: Use `TemperatureCache` for analogous & complementary colors.

- `scheme`: Add `DynamicScheme` and its subclasses:
    - `SchemeExpressive`
    - `SchemeMonochrome`
    - `SchemeNeutral`
    - `SchemeTonalSpot`
    - `SchemeVibrant`
    - `SchemeFidelity`
    - `SchemeContent`

- `hct`: Add `inViewingConditions` to `hct`, for color relativity.
- `utilities`: Add `lstarFromY` method, utility which is the inverse of `yFromLstar`.

### Changed

- Export all public API in `material_color_utilities.dart`.
- Bump minimum Flutter SDK version to `2.17.0`.

### Fixed

- Fix missing `hashCode` override for `Hct`.
- Fix `TonalPalette` equality operator when different constructors are used ([#56](https://github.com/material-foundation/material-color-utilities/issues/56)).

## 0.2.0 - 2022-08-05

### Added

- Add support for content color.
- Add `outlineVariant` and `scrim` colors.

### Changed

- Rename `CamSolver` to `HctSolver`.

### Fixed

- Correct `repository` in 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_color` packages.
- Add `operator ==` and `toString` overrides to `Hct`.

### Changed

- Improve documentation for `color_utils.dart`.
- Rename `HctColor` to `Hct`.

### Fixed

- Fix README import.

## 0.1.4 - 2022-01-21

### Added

- Allow creation of `Scheme` from a `CorePalette` with `lightFromCorePalette` and `darkFromCorePalette`

## 0.1.3 - 2021-12-10

### Added

- Export `Scheme`.

## 0.1.2 - 2021-12-02

### Changed

- Update `Scheme` tonal values.
- Move `matcher` to pubspec's `dev_dependencies`.

## 0.1.1 - 2021-10-28

### Changed

- Update pubspec `description`.

### Fixed

- Fix `matcher` version incompatibility with Flutter stable.

## 0.1.0 - 2021-10-28

### Added

- Create library.







 
