Skip to content

Commit

Permalink
Merge pull request #396 from helgeerbe/Issue394
Browse files Browse the repository at this point in the history
Force color tuple to contain native Python integer values
  • Loading branch information
jgodfrey authored Aug 2, 2024
2 parents 7757e90 + d8882d3 commit 1bbc527
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/picframe/mat_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def __scale_image(self, image, size=None):
def __get_outer_mat_color(self, image):
k = KmeansNp(k=3, max_iterations=10, size=100)
colors = k.run(image)
return tuple(colors[0])
return tuple(colors[0].tolist())

def __get_darker_shade(self, rgb_color, fractional_percent=0.5):
return tuple(map(lambda c: int(c * fractional_percent), rgb_color))
Expand Down

0 comments on commit 1bbc527

Please sign in to comment.