Skip to content

An experimental project that generates Material 3 color scheme from the current wallpaper on macOS

Notifications You must be signed in to change notification settings

Crazelu/material-you-macOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Material You macOS

This is an experimental project that generates Material 3 color scheme from the current wallpaper on macOS. The goal is to build apps that adapt their theme to whatever wallpaper that is set.

How it works 💡

A polling mechanism is setup to take a screenshot of the main macOS window every second. The screenshot is cropped to remove the top controls, scaled down aggresively to use as little memory as possible and then sent over an EventChannel to the Flutter side if it is a visually distinct image. Visual distinction is determined by computing the variance between the last screenshot and current one. If the variance does not exceed the set threshold, no events are sent to the Flutter side to prevent unnecessary rebuilds and message hopping.

On the Flutter side, the image is used to create a ColorScheme using ColorScheme.fromImageProvider. Whenever a new image is received, a new color scheme is generated and the app rebuilt to reflect the new theme.

Demo 📷

Material You macOS experiment demo

About

An experimental project that generates Material 3 color scheme from the current wallpaper on macOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published