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.
There are also a relatively large number of unused variables and functions (45 warnings!). I do not know for what reason they are not used in the original code (apart from a few tests), but I decided to leave them for the future.
Small F.A.Q: Why does it require std?
I tried to rewrite everything so that the use of std was optional, but I ran into one specific problem. Using rand::thread_rng is not possible without std. So, unfortunately, this library still requires std.
Examples
From HEX color:
use theme_from_source_color;
use argb_from_hex;
From image:
:warning: Before obtaining an array of ARGB pixels for the image, it is recommended to adjust its dimensions to 128x128 (by
resizefunction fromimagecrate, for example). The reason is described here.
use Cursor;
use Argb;
use theme_from_source_color;
use source_color_from_image;
use Reader as ImageReader;
use resize;
use FilterType;
async