Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def decode(im,col):
|
|
19 |
rgb_tup = tuple(int(h1[i:i+2], 16) for i in (0, 2, 4))
|
20 |
|
21 |
for item in datas:
|
22 |
-
if item[0] in range(rgb_tup[0]-
|
23 |
newData.append((0,0,0))
|
24 |
else:
|
25 |
newData.append((255,255,255))
|
|
|
19 |
rgb_tup = tuple(int(h1[i:i+2], 16) for i in (0, 2, 4))
|
20 |
|
21 |
for item in datas:
|
22 |
+
if item[0] in range(rgb_tup[0]-15,rgb_tup[0]+15) and item[1] in range(rgb_tup[1]-15,rgb_tup[1]+15) and item[2] in range(rgb_tup[2]-15,rgb_tup[2]+15):
|
23 |
newData.append((0,0,0))
|
24 |
else:
|
25 |
newData.append((255,255,255))
|