Add content-based colorScheme functionality#122919
Merged
esouthren merged 40 commits intoflutter:masterfrom Mar 19, 2023
Merged
Add content-based colorScheme functionality#122919esouthren merged 40 commits intoflutter:masterfrom
esouthren merged 40 commits intoflutter:masterfrom
Conversation
esouthren
pushed a commit
to flutter/assets-for-api-docs
that referenced
this pull request
Mar 17, 2023
For flutter/flutter#122919. Images are used in the demo for image color extraction to generate color schemes. Images are owned by Google and have unrestricted licensing.
esouthren
pushed a commit
to flutter/assets-for-api-docs
that referenced
this pull request
Mar 17, 2023
For flutter/flutter#122919. Images are used in the demo for image color extraction to generate color schemes. Images are owned by Google and have unrestricted licensing.
HansMuller
approved these changes
Mar 18, 2023
Contributor
HansMuller
left a comment
There was a problem hiding this comment.
This looks great. Nearly all of the feedback is trivial formatting stuff (mostly just advocating fewer line breaks).
5 tasks
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 19, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Mar 19, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 10, 2023
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
May 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #119333.
Adds
ColorScheme.fromImageProvider()constructor to Material's color scheme.This allows users to pass an
ImageProviderand receive a Material-based color scheme from the dominant colors of the image. By using anImageProvider, developers can use local assets, network or memory images. We use the Material Color Utilities library to extract and score the dominant colors of the image.The scheme can be in light or dark mode, and additionally, any property of the scheme can be overridden with custom colors if they are preferred over the generated colors.
An
examples/demo has been added, with a further update to the Material 3 demo app to come.The example demo looks as follows:
screen.mov
Pre-launch Checklist
///).