Closed vkottler closed 2 years ago
Drive-by upgrade - make sure both Rgb
and Hsl
colors can have valid ==
checks done on them between each of the two types so that you can check if rgb1 == rgb2
and rgb1 == hsl1
Consider adding support for "alpha channel" in colors https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
We finished adding alpha channels to RGB and HSL, can now add a Color
to a style attribute.
Should be ready to work on this issue (and figure out how we want to organize colors in general)
Something we should implement: https://github.com/material-components/material-components-web/blob/master/packages/mdc-theme/_theme-color.scss#L42
Google used https://gka.github.io/chroma.js/#color-darken
This tool is a good example of what's going on probably: http://vis4.net/palettes/#/32|s|00429d,65ffe9,ffffe0|ffffe0,ff005e,93003a|1|1
Add a class for color palette, figure out a way to plot an analysis of the palette (just show trends)
add the material design themes to the code
find the actual material design generator code
This person has the "Google algorithm" https://github.com/edelstone/material-palette-generator
We need to support "HCT": https://github.com/material-foundation/material-color-utilities/blob/main/typescript/hct/hct.ts
To have a conversion to RGBA, we may need to add support for a few other color or perception models.
The Google code seems to be using: https://en.m.wikipedia.org/wiki/RGBA_color_model
Not worth the effort: https://github.com/vkottler/svgen/wiki#choosing-colors
Figure out what https://material.io/design/color/the-color-system.html#tools-for-picking-colors is doing (likely in HSL-space) and create interfaces to generate "themes"
We should probably make a higher level "color" that has both HSL and RGB, then we can make a set of colors from that (theme class)