From 373ed50276147ffd6963c8e4cd831c0acaf297b7 Mon Sep 17 00:00:00 2001 From: 17ms <79069176+17ms@users.noreply.github.com> Date: Thu, 25 Jan 2024 19:12:42 +0200 Subject: [PATCH] black formatted --- ansi-codes.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ansi-codes.py b/ansi-codes.py index 65ab2d0..54957b2 100755 --- a/ansi-codes.py +++ b/ansi-codes.py @@ -3,7 +3,7 @@ # A script to convert RGB to ansi escape codes -while (True): +while True: colour = input("R G B (empty to exit): ") if colour == "": @@ -15,14 +15,15 @@ while (True): ansi_letter = f"\x1b[38;2;{r};{g};{b}m" end_c = "\u001b[0m" bold = "\u001b[1m" - + print(f"\nColour: \\x1b[38;2;{r};{g};{b}m") print(f"Background: \\u001b[48;2;{r};{g};{b}m\n") - - print(f''' + + print( + f""" {bold}{ansi_letter}ABCDE {ansi_box}ABCDE{end_c} {bold}{ansi_letter}FGHIJ {ansi_box}FGHIJ{end_c} {bold}{ansi_letter}KLMNO {ansi_box}KLMNO{end_c} - ''') - + """ + )