Skip to content

Commit 36bd0f4

Browse files
committed
minor bug fix
1 parent b10c7a0 commit 36bd0f4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

materialyoucolor/utils/theme_utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from materialyoucolor.palettes.core_palette import CorePalette
33
from materialyoucolor.palettes.tonal_palette import TonalPalette
44
from materialyoucolor.scheme import Scheme
5-
from materialyoucolor.utils.image_utils import source_color_from_image
65
from materialyoucolor.dislike.dislike_analyzer import DislikeAnalyzer
76
from materialyoucolor.hct import Hct
87

@@ -21,10 +20,10 @@ def __init__(
2120
self.custom_colors = custom_colors
2221

2322

24-
def custom_color(custom_color, source_color=None, blend=False):
25-
value = DislikeAnalyzer.fix_if_disliked(Hct.from_int(custom_color))
23+
def custom_color(custom_color : int, source_color=None, blend=False):
24+
value = DislikeAnalyzer.fix_if_disliked(Hct.from_int(custom_color)).to_int()
2625
if blend:
27-
value = Blend.harmonize(value, source_color)
26+
value = Blend.harmonize(custom_color, source_color)
2827
palette = CorePalette.of(value)
2928
tones = palette.a1
3029
return {

0 commit comments

Comments
 (0)