libmonet 2.0.0-dev.18 copy "libmonet: ^2.0.0-dev.18" to clipboard
libmonet: ^2.0.0-dev.18 copied to clipboard

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.

2.0.0 #

  • Bumped minimum SDK version to Dart 3.12.

  • Ported from upstream Material Color Utilities:

    • Added CMF Scheme in 2026 spec. (19ad665)
    • Refactor DynamicScheme to accept a list of source colors. (4578d0a)
    • Updated background for on-fixed colors in ColorSpec2026. (91da30d)
    • Adjust chroma calculation in ColorSpec2025 for yellow hues at tone 99. (1a34bd2)
    • Added support for energy color generation via the new EnergyColors utility. Implementation is experimental as it comes from an unreleased version of the upstream library.
  • Renamed android_dynamic_colors library to android_color_utilities.

  • Fixed an upstream issue of AndroidDynamicColors.clockSecond and AndroidDynamicColors.weatherTemp having a medium contrast of 70, when it should've been 7.

  • Ported from upstream Android source code:

    • Added surfaceEffect0, surfaceEffect1, surfaceEffect2, surfaceEffect3,surfaceEffect0Fallback color roles representing translucent surfaces with background effects to AndroidDynamicColors.
    • Added SchemeClock and SchemeClockVibrant to the android_color_utilities library.
    • Added Cam16.getInt and Cam16.getIntInViewingConditions to the material_color_utilities library.
  • Massively refactored DynamicScheme (including deviations from upstream):

    • Removed custom palette key colors support from DynamicScheme.
    • Replaced sourceColorHct with sourceColor of type TonalPaletteSourceColor.
    • Renamed DynamicScheme.fromPalettesOrKeyColors to DynamicScheme.withDefaults.
    • All DynamicScheme.withDefaults and Scheme* constructor parameters are now optional (isDark defaults to false as per md.sys.color token defaults).
    • Implemented complex fallback logic for isDark, platform and specVersion.
    • Added DynamicScheme.raw for creating potentially logically impossible scheme configurations.
  • Aligning the library with Dart best practices:

    • Renamed TemperatureCache.getComplement to TemperatureCache.complement and made it a getter.
    • Changed Score.score positional parameters to be named instead.
    • Made Hct immutable to avoid issues with value equality in collections: removed hue, chroma and tone setters and added a new copyWith method.
    • Added year property to SpecVersion and implemented Comparable<SpecVersion> in order to make spec versions orderable.
  • Added a default libmonet library which exports all members from the other libraries.

  • Added generated example schemes in CSS and Figma formats.

  • Refactored internal file structure (breaks source code imports).

  • Other minor changes.

1.2.0 #

  • Inlined more utility functions.

  • Removed MathUtils.signum in favor of num.sign.

  • Addressed linter feedback.

  • Code style updates.

  • Upgraded dependencies.

1.1.2 #

  • Made sure Flutter-specific directories get ignored when publishing the package.

1.1.1 #

  • Deprecated MathUtils.signum in favor of num.sign.

1.1.0 #

  • Added caching to MaterialDynamicColors which prevents the class from being const-constructable.

  • Removed redundant libraries which were partials of material_color_utilities.

  • Publicly exposed ColorSpec2021 and ColorSpec2025 classes.

  • Introduced a new library android_dynamic_colors which contains a AndroidDynamicColors class which is a port of com.android.systemui.monet.CustomDynamicColors.

  • Fixed incorrect Dart class delegation by replacing it with plain inheritance in ColorSpec2025.

  • Refactored the library internally to improve code style and readability.

  • Updated analysis_options.yaml to ensure correct lint rules are being used during development.

  • Updated .gitignore to match other workspace packages.

1.0.0 #

  • Initial version.
2
likes
140
points
397
downloads

Documentation

API reference

Publisher

verified publisherdeminearchiver.qzz.io

Weekly Downloads

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.

Homepage
Repository (GitHub)
View/report issues

Topics

#color #hct #material #android #utility

License

MIT (license)

Dependencies

collection, meta

More

Packages that depend on libmonet