Created
March 7, 2022 13:14
-
-
Save Shalabyelectronics/19a00239dc6ae9dd598767e32eedfd3d to your computer and use it in GitHub Desktop.
شرح تغيير ألوان الخط بإستخدام مكتبة colorama
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from colorama import init, Fore, Back, Style | |
#اذا كنت تريد تشغيل الخطوط من ويندوز فعل هذه الدالة | |
init() | |
#الألوان الخطوط الموجودة | |
FORES = [ Fore.BLACK, Fore.RED, Fore.GREEN, Fore.YELLOW, Fore.BLUE, Fore.MAGENTA, Fore.CYAN, Fore.WHITE ] | |
# ألوان الخلفيات الموجودة | |
BACKS = [ Back.BLACK, Back.RED, Back.GREEN, Back.YELLOW, Back.BLUE, Back.MAGENTA, Back.CYAN, Back.WHITE ] | |
# شدة الألوان او الأضاءة | |
BRIGHTNESS = [ Style.DIM, Style.NORMAL, Style.BRIGHT ] | |
# كيفية تطبيق لون معين | |
print(f{Fore.RED}{Back.GREEN}HELLO SHALABY{Style.RESET_ALL}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment