[O] Optimize
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from hyfetch.color_util import RGB
|
||||
|
||||
if __name__ == '__main__':
|
||||
pink = RGB.from_hex('#F6AAB7').to_ansi_rgb()
|
||||
blue = RGB.from_hex('#55CDFD').to_ansi_rgb()
|
||||
|
||||
# Clear the screen
|
||||
print('\x1b[2J', end='')
|
||||
print('\x1b[H', end='')
|
||||
# Print a message
|
||||
print('Hello, world!')
|
||||
# Move cursor to line 10, column 5
|
||||
print('\x1b[10;5H', end='')
|
||||
# Print a message with color
|
||||
print(f'{pink}Hello, world!\x1b[0m\r\n', end='')
|
||||
print("Hi, I'm a cat!\r\n", end='')
|
||||
# Set the color of "world" to blue
|
||||
# print('\x1b[10;15H', end='')
|
||||
# print(blue + "w", end='')
|
||||
|
||||
Reference in New Issue
Block a user