|
@@ -30,8 +30,10 @@ def generate_random_colour(sort:str="hex"):
|
|
|
if sort.lower() == "rgb":
|
|
if sort.lower() == "rgb":
|
|
|
return rgb_values
|
|
return rgb_values
|
|
|
|
|
|
|
|
- if sort.lower() == "ansi":
|
|
|
|
|
|
|
+ if sort.lower() == "print-ansi":
|
|
|
return print(f"\033[38;2;{rgb_values[0]};{rgb_values[1]};{rgb_values[2]}m")
|
|
return print(f"\033[38;2;{rgb_values[0]};{rgb_values[1]};{rgb_values[2]}m")
|
|
|
|
|
+ if sort.lower() == "ansi":
|
|
|
|
|
+ return f"\033[38;2;{rgb_values[0]};{rgb_values[1]};{rgb_values[2]}m"
|
|
|
|
|
|
|
|
# Convert to HEX values
|
|
# Convert to HEX values
|
|
|
hex_colours = [hex(value)[2:] for value in rgb_values] # Strip the '0x' prefix
|
|
hex_colours = [hex(value)[2:] for value in rgb_values] # Strip the '0x' prefix
|