feat(coloryou): add another color to output

This commit is contained in:
matt1432 2023-09-18 13:35:35 -04:00
parent e3eb03fcd0
commit 9f7bb5e166
2 changed files with 5 additions and 3 deletions

View file

@ -41,9 +41,11 @@ def get_material_you_colors(image_path: str) -> dict:
theme = themeFromImage(img)
themePalette = theme.get("palettes")
themePalettePrimary = themePalette.get("primary")
parsed_colors = {"imageAccent": hexFromArgb(themePalettePrimary.tone(40)), "buttonAccent": hexFromArgb(themePalettePrimary.tone(90)), "buttonText": hexFromArgb(themePalettePrimary.tone(10))}
parsed_colors = {"imageAccent": hexFromArgb(themePalettePrimary.tone(40)),
"buttonAccent": hexFromArgb(themePalettePrimary.tone(90)),
"buttonText": hexFromArgb(themePalettePrimary.tone(10)),
"hoverAccent": hexFromArgb(themePalettePrimary.tone(85))}
# parsed_colors = {"bright": colors[3], "dark": colors[9]}
return parsed_colors
print(json.dumps(get_material_you_colors(args.image_path)))

View file

@ -16,7 +16,7 @@ let
f = { buildPythonPackage, utils, material-color-utilities }:
buildPythonPackage rec {
pname = "coloryou";
version = "0.0.2";
version = "0.1.0";
# If you have your sources locally, you can specify a path
src = ./.;