Skip to content

Dynamic color does not respect system's color contrast setting #627

@amal-stack

Description

@amal-stack

Package

dynamic_color

Existing issue?

What happened?

Expected vs actual result:

  1. Material 3 has introduced user-controlled color contrast which allows users to select three levels of contrast:
    image
  2. According to the linked specification, the color scheme should "automatically" inherit the system contrast settings. However, the dynamic_color plugin does not respect this setting. The colors provided by the plugin are always the same irrespective of the contrast setting.

Steps to reproduce:

  1. Create a Flutter app and add the dynamic_color package.
  2. Use DynamicColorBuilder to get the light and dark color schemes.
  3. Run the app on Android where the contrast setting is supported. To change the contrast, go to Developer Options > Contrast.
  4. After changing the contrast, open another app where dynamic color is supported like Google Drive to observe the differences.
  5. Reopen the Flutter app. It can be observed that the colors do not change as per the selected contrast option.

The dynamic_color plugin has additional critical issues (such as broken dynamic tone-based and fixed color roles, #574, #582) that have impacted Flutter for an extended period. This plugin provides one of the key features of Material 3 for Flutter. However, it has not been updated for over 7-8 months.

Hoping to see these issues prioritized and addressed soon.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp: dynamic_colortriageIssues that haven't been fully triaged (labels applied, reproducible bug / relevant feature request)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions