Skip to content

Update MaterialColor API docs to migrate to ColorScheme for Material3 apps #127228

@seriann

Description

@seriann

Is there an existing issue for this?

Use case

I'm new to Flutter and I'm trying to configure a custom color scheme while respecting Material 3 color conventions. According to the Material 3 documentation, a tonal palette consists of thirteen tones, including white and black. A tone value of 100 represents maximum lightness and results in white. Each tone value between 0 and 100 expresses the amount of light present in the color.

I'm attempting to use the MaterialColor class to implement my custom colors, but it seems to be following the Material 2 convention instead.

I have referred to the Material 3 documentation (https://m3.material.io/styles/color/the-color-system/key-colors-tones#6bdb9471-b70d-42c9-8ace-76743c1fff13) and noticed that the color system and conventions described there differ from what I'm experiencing with the MaterialColor class.

Here are some screenshots illustrating the differences:

Material 3 Color Conventions:
image

MaterialColor class:
image
image

Material 2 Color Conventions:
https://m2.material.io/design/color/the-color-system.html#color-usage-and-palettes
image

Proposal

Maybe an update to that class to support new Material 3 colors conventions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions