mcg icon indicating copy to clipboard operation
mcg copied to clipboard

add Google's algorithm

Open filipeglfw opened this issue 5 years ago • 2 comments

Added two new algorithms:

Google

This will reproduce exactly what Google's color tool generates. Sometimes this tool slightly changes the input color. For exemple, when inputing #350094 it will return a pallete with #340094

Google exact

I am terrible at naming things, so you're welcome to change this. I've tweaked the code from the previous algorithm so that it will return the input value exactly.


Google's original Material Palletes did not have A colors for the Brown, Gray and Blue Gray, so that the algorithm will not return A colors in case the input is close to those.

Closes #118

filipeglfw avatar May 27 '20 18:05 filipeglfw

Just as a reference, here are the palletes generated with the algorithm compared to the one from Google's documentation.

image

filipeglfw avatar May 27 '20 18:05 filipeglfw

@mbitson

SimonIT avatar Jan 22 '22 13:01 SimonIT