Material colors
A Rust library for generating Material You themes (as well as color schemes)
Most of the code was taken from the Swift version of material-color-utilities, as its code is the easiest to rewrite.
Examples
From HEX color:
use FromStr;
use ;
From image:
⚠️ Before obtaining an array of ARGB pixels for the image, it is recommended (but not necessary if your image is already small in size or you just don't mind about execution time) to adjust its dimensions to 128x128 (by
resize
function fromimage
crate, for example). The reason is described here.
use ;
async