You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Get the average color of a block (returns None if there isn't any)
13
+
defget_block_avg_color(blockname):
14
+
returnblockmodel_avgs.get(blockname)
15
+
16
+
# Get a block with the closest average to the specified color, its average, and the difference (there's no need to use a 16-tuple tree here so I didn't)
17
+
defget_closest_colored_block(color):
18
+
# Convert the color to a numpy array if it isn't already
0 commit comments