feat(coloryou): add another color to output
This commit is contained in:
parent
e3eb03fcd0
commit
9f7bb5e166
2 changed files with 5 additions and 3 deletions
|
@ -41,9 +41,11 @@ def get_material_you_colors(image_path: str) -> dict:
|
||||||
theme = themeFromImage(img)
|
theme = themeFromImage(img)
|
||||||
themePalette = theme.get("palettes")
|
themePalette = theme.get("palettes")
|
||||||
themePalettePrimary = themePalette.get("primary")
|
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
|
return parsed_colors
|
||||||
|
|
||||||
print(json.dumps(get_material_you_colors(args.image_path)))
|
print(json.dumps(get_material_you_colors(args.image_path)))
|
||||||
|
|
|
@ -16,7 +16,7 @@ let
|
||||||
f = { buildPythonPackage, utils, material-color-utilities }:
|
f = { buildPythonPackage, utils, material-color-utilities }:
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "coloryou";
|
pname = "coloryou";
|
||||||
version = "0.0.2";
|
version = "0.1.0";
|
||||||
|
|
||||||
# If you have your sources locally, you can specify a path
|
# If you have your sources locally, you can specify a path
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
Loading…
Reference in a new issue