Missing module import - materialyoucolor.utils.image_utils
When importing theme_from_source_color from materialyoucolor.utils.theme_utils, I found following missing import causing crash: (<class 'ModuleNotFoundError'>, ModuleNotFoundError("No module named 'materialyoucolor.utils.image_utils'"))
Code snippet: from materialyoucolor.utils.theme_utils import theme_from_source_color from materialyoucolor.utils.color_utils import argb_from_rgb
theme = theme_from_source_color(argb_from_rgb(255, 0, 0, 255))
Edit: commenting line in theme_utils: #from materialyoucolor.utils.image_utils import source_color_from_image Seems not to break the theme_from_source_color, but I do not know about other utilities.
Refer examples of README.
# Color in hue, chroma, tone form
from materialyoucolor.hct import Hct
from materialyoucolor.dynamiccolor.material_dynamic_colors import MaterialDynamicColors
# There are 9 different variants of scheme.
from materialyoucolor.scheme.scheme_tonal_spot import SchemeTonalSpot
# Others you can import: SchemeExpressive, SchemeFruitSalad, SchemeMonochrome, SchemeRainbow, SchemeVibrant, SchemeNeutral, SchemeFidelity and SchemeContent
# SchemeTonalSpot is android default
scheme = SchemeTonalSpot( # choose any scheme here
Hct.from_int(0xff4181EE), # source color in hct form
True, # dark mode
0.0, # contrast
)
for color in vars(MaterialDynamicColors).keys():
color_name = getattr(MaterialDynamicColors, color)
if hasattr(color_name, "get_hct"): # is a color
print(color, color_name.get_hct(scheme).to_rgba()) # print name of color and value in rgba format
# background [14, 20, 21, 255]
# onBackground [222, 227, 229, 255]
# surface [14, 20, 21, 255]
# surfaceDim [14, 20, 21, 255]
# ...
Ok, I see. Thank you for your response. Still - it would be nice, if things that are not working were either fixed or removed, but it is up to you. Have a great day.