Skip to content

Commit 50ab252

Browse files
committed
Added all compatable codehs colors!
1 parent f31b1ef commit 50ab252

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Image-Dict/convert.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
output_file.write("image_list = [")
99
resolution = int(input("Set your res (default is 2): "))
1010

11-
list_of_colors = [[255,0,0],[0,255,0],[0,0,255],[255,255,255],[0,0,0],[255,255,0],[0,255,255],[255,0,255],[100,100,100]]
12-
list_of_names = ["Red", "Green", "Blue", "White", "Black","Yellow","Cyan","Purple","Grey"]
11+
list_of_colors = [[0,0,0],[0,0,255],[150,75,0],[0,255,255],[255,215,0],[128,128,128],[0,255,0],[75,0,130],[255,165,0],[251,96,127],[160,32,240],[255,0,0],[143,0,255],[255,255,255],[250,255,0]]
12+
list_of_names = ["black", "blue", "brown", "cyan", "gold", "gray", "green", "indigo", "orange", "pink", "purple", "red", "violet", "white", "yellow"]
1313

1414
def closest(colors,color):
1515
colors = np.array(colors) # all the colors are now an array
@@ -39,7 +39,7 @@ def closest(colors,color):
3939
index_in_array = index_in_array + 1
4040

4141
print(output_color)
42-
if(output_color != "White"):
42+
if(output_color != "white"):
4343
output_file.write("\"" + str(column) + " " + str(row) + " " + output_color + "\", ")
4444
output_file.write("""]
4545

Image-Dict/image.png

47.1 KB
Loading

Image-Dict/output.py

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)