Skip to content

Conversation

@filipeglfw
Copy link

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
Copy link
Author

filipeglfw commented May 27, 2020

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

image

@SimonIT
Copy link

SimonIT commented Jan 22, 2022

@mbitson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Google's algorithm

2 participants