Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 8f3c830

Browse files
authored
Merge branch 'master' into feature/add-linux-compatibility
2 parents 0ecca93 + 757a1a4 commit 8f3c830

File tree

6 files changed

+582
-8
lines changed

6 files changed

+582
-8
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# ----------------------------------------------------------------------------------------------------------------------
2+
# - Package Imports -
3+
# ----------------------------------------------------------------------------------------------------------------------
4+
# General Packages
5+
6+
# Custom Library
7+
8+
# Custom Packages
9+
from .RgbControlled_Callable import RgbControlled_Callable
10+
from .MakeUp import (
11+
NoForeground,
12+
NoBackground,
13+
NoUnderline
14+
)
15+
16+
# ----------------------------------------------------------------------------------------------------------------------
17+
# - Code -
18+
# ----------------------------------------------------------------------------------------------------------------------
19+
Fore = RgbControlled_Callable(
20+
param_code= f"[38;2;",
21+
reset=NoForeground
22+
)
23+
24+
Back = RgbControlled_Callable(
25+
param_code= f"[48;2;",
26+
reset=NoBackground
27+
)
28+
29+
Underline = RgbControlled_Callable(
30+
param_code= f"[58;2;",
31+
reset=NoUnderline
32+
)
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# ----------------------------------------------------------------------------------------------------------------------
2+
# - Package Imports -
3+
# ----------------------------------------------------------------------------------------------------------------------
4+
# General Packages
5+
6+
# Custom Library
7+
8+
# Custom Packages
9+
from AthenaColor import init
10+
from AthenaColor.BASE import end_codes
11+
12+
13+
# ----------------------------------------------------------------------------------------------------------------------
14+
# - Code -
15+
# ----------------------------------------------------------------------------------------------------------------------
16+
esc = init.esc
17+
end = end_codes.color
18+
19+
def Reset (*obj) -> str: return ''.join([f'{esc}[0{end}' ,*[o+ f'{esc}[0{end}' for o in obj],f'' ])
20+
def Bold (*obj) -> str: return ''.join([f'{esc}[1{end}' ,*[o+ f'{esc}[1{end}' for o in obj],f'{esc}[22{end}' ])
21+
def NoBold (*obj) -> str: return ''.join([f'{esc}[22{end}',*[o+ f'{esc}[22{end}' for o in obj],f'{esc}[1{end}' ])
22+
def Dim (*obj) -> str: return ''.join([f'{esc}[2{end}' ,*[o+ f'{esc}[2{end}' for o in obj],f'{esc}[22{end}' ])
23+
def NoDim (*obj) -> str: return ''.join([f'{esc}[22{end}',*[o+ f'{esc}[22{end}' for o in obj],f'{esc}[2{end}' ])
24+
def Italic (*obj) -> str: return ''.join([f'{esc}[3{end}' ,*[o+ f'{esc}[3{end}' for o in obj],f'{esc}[23{end}' ])
25+
def NoItalic (*obj) -> str: return ''.join([f'{esc}[23{end}',*[o+ f'{esc}[23{end}' for o in obj],f'{esc}[3{end}' ])
26+
def Underline (*obj) -> str: return ''.join([f'{esc}[4{end}' ,*[o+ f'{esc}[4{end}' for o in obj],f'{esc}[24{end}' ])
27+
def NoUnderline (*obj) -> str: return ''.join([f'{esc}[24{end}',*[o+ f'{esc}[24{end}' for o in obj],f'{esc}[4{end}' ])
28+
def BlinkSlow (*obj) -> str: return ''.join([f'{esc}[5{end}' ,*[o+ f'{esc}[5{end}' for o in obj],f'{esc}[25{end}' ]) # NOT WORKING PYCHARM
29+
def NoBlinkSlow (*obj) -> str: return ''.join([f'{esc}[25{end}',*[o+ f'{esc}[25{end}' for o in obj],f'{esc}[5{end}' ]) # NOT WORKING PYCHARM
30+
def BlinkRapid (*obj) -> str: return ''.join([f'{esc}[6{end}' ,*[o+ f'{esc}[6{end}' for o in obj],f'{esc}[25{end}' ]) # NOT WORKING PYCHARM
31+
def NoBlinkRapid (*obj) -> str: return ''.join([f'{esc}[25{end}',*[o+ f'{esc}[25{end}' for o in obj],f'{esc}[6{end}' ]) # NOT WORKING PYCHARM
32+
def Reversed (*obj) -> str: return ''.join([f'{esc}[7{end}' ,*[o+ f'{esc}[7{end}' for o in obj],f'{esc}[27{end}' ])
33+
def NoReversed (*obj) -> str: return ''.join([f'{esc}[27{end}',*[o+ f'{esc}[27{end}' for o in obj],f'{esc}[7{end}' ])
34+
def Conceal (*obj) -> str: return ''.join([f'{esc}[8{end}' ,*[o+ f'{esc}[8{end}' for o in obj],f'{esc}[28{end}' ]) # NOT WORKING PYCHARM
35+
def NoConceal (*obj) -> str: return ''.join([f'{esc}[28{end}',*[o+ f'{esc}[28{end}' for o in obj],f'{esc}[8{end}' ]) # NOT WORKING PYCHARM
36+
def Crossed (*obj) -> str: return ''.join([f'{esc}[9{end}' ,*[o+ f'{esc}[9{end}' for o in obj],f'{esc}[29{end}' ])
37+
def NoCrossed (*obj) -> str: return ''.join([f'{esc}[29{end}',*[o+ f'{esc}[29{end}' for o in obj],f'{esc}[9{end}' ])
38+
def FontPrimary (*obj) -> str: return ''.join([f'{esc}[10{end}',*[o+ f'{esc}[10{end}' for o in obj],f'{esc}[10{end}' ]) # NOT WORKING PYCHARM
39+
def FontSecond1 (*obj) -> str: return ''.join([f'{esc}[11{end}',*[o+ f'{esc}[11{end}' for o in obj],f'{esc}[10{end}' ]) # NOT WORKING PYCHARM
40+
def FontSecond2 (*obj) -> str: return ''.join([f'{esc}[12{end}',*[o+ f'{esc}[12{end}' for o in obj],f'{esc}[10{end}' ]) # NOT WORKING PYCHARM
41+
def FontSecond3 (*obj) -> str: return ''.join([f'{esc}[13{end}',*[o+ f'{esc}[13{end}' for o in obj],f'{esc}[10{end}' ]) # NOT WORKING PYCHARM
42+
def FontSecond4 (*obj) -> str: return ''.join([f'{esc}[14{end}',*[o+ f'{esc}[14{end}' for o in obj],f'{esc}[10{end}' ]) # NOT WORKING PYCHARM
43+
def FontSecond5 (*obj) -> str: return ''.join([f'{esc}[15{end}',*[o+ f'{esc}[15{end}' for o in obj],f'{esc}[10{end}' ]) # NOT WORKING PYCHARM
44+
def FontSecond6 (*obj) -> str: return ''.join([f'{esc}[16{end}',*[o+ f'{esc}[16{end}' for o in obj],f'{esc}[10{end}' ]) # NOT WORKING PYCHARM
45+
def FontSecond8 (*obj) -> str: return ''.join([f'{esc}[17{end}',*[o+ f'{esc}[17{end}' for o in obj],f'{esc}[10{end}' ]) # NOT WORKING PYCHARM
46+
def FontSecond9 (*obj) -> str: return ''.join([f'{esc}[18{end}',*[o+ f'{esc}[18{end}' for o in obj],f'{esc}[10{end}' ]) # NOT WORKING PYCHARM
47+
def FontSecond10 (*obj) -> str: return ''.join([f'{esc}[19{end}',*[o+ f'{esc}[19{end}' for o in obj],f'{esc}[10{end}' ]) # NOT WORKING PYCHARM
48+
def NoFont (*obj) -> str: return ''.join([f'{esc}[10{end}',*[o+ f'{esc}[10{end}' for o in obj] ]) # NOT WORKING PYCHARM
49+
def Fraktur (*obj) -> str: return ''.join([f'{esc}[20{end}',*[o+ f'{esc}[20{end}' for o in obj] ]) # NOT WORKING PYCHARM
50+
def UnderlineDouble (*obj) -> str: return ''.join([f'{esc}[21{end}',*[o+ f'{esc}[21{end}' for o in obj],f'{esc}[24{end}' ])
51+
def NoUnderlineDouble (*obj) -> str: return ''.join([f'{esc}[24{end}',*[o+ f'{esc}[24{end}' for o in obj],f'{esc}[21{end}' ])
52+
def PropSpacing (*obj) -> str: return ''.join([f'{esc}[26{end}',*[o+ f'{esc}[26{end}' for o in obj],f'{esc}[26{end}' ]) # NOT WORKING PYCHARM
53+
def NoPropSpacing (*obj) -> str: return ''.join([f'{esc}[26{end}',*[o+ f'{esc}[26{end}' for o in obj],f'{esc}[26{end}' ]) # NOT WORKING PYCHARM
54+
def NoForeground (*obj) -> str: return ''.join([f'{esc}[39m' ,*[o+ f'{esc}[39m' for o in obj],f'' ])
55+
def NoBackground (*obj) -> str: return ''.join([f'{esc}[49{end}',*[o+ f'{esc}[49{end}' for o in obj],f'' ])
56+
def Frame (*obj) -> str: return ''.join([f'{esc}[51{end}',*[o+ f'{esc}[51{end}' for o in obj],f'{esc}[54{end}' ])
57+
def NoFrame (*obj) -> str: return ''.join([f'{esc}[54{end}',*[o+ f'{esc}[54{end}' for o in obj],f'{esc}[51{end}' ])
58+
def Circle (*obj) -> str: return ''.join([f'{esc}[52{end}',*[o+ f'{esc}[52{end}' for o in obj],f'{esc}[54{end}' ])
59+
def NoCircle (*obj) -> str: return ''.join([f'{esc}[54{end}',*[o+ f'{esc}[54{end}' for o in obj],f'{esc}[52{end}' ])
60+
def OverLine (*obj) -> str: return ''.join([f'{esc}[53{end}',*[o+ f'{esc}[53{end}' for o in obj],f'{esc}[55{end}' ])
61+
def NoOverLine (*obj) -> str: return ''.join([f'{esc}[55{end}',*[o+ f'{esc}[55{end}' for o in obj],f'{esc}[53{end}' ])
62+
def UnderColourDefault (*obj) -> str: return ''.join([f'{esc}[59{end}',*[o+ f'{esc}[59{end}' for o in obj],f'' ])
63+
def IdeogramUnderLine (*obj) -> str: return ''.join([f'{esc}[60{end}',*[o+ f'{esc}[60{end}' for o in obj],f'{esc}[65{end}' ])
64+
def IdeogramUnderLineDouble (*obj) -> str: return ''.join([f'{esc}[61{end}',*[o+ f'{esc}[61{end}' for o in obj],f'{esc}[65{end}' ])
65+
def IdeogramOverLine (*obj) -> str: return ''.join([f'{esc}[62{end}',*[o+ f'{esc}[62{end}' for o in obj],f'{esc}[65{end}' ])
66+
def IdeogramOverLineDouble (*obj) -> str: return ''.join([f'{esc}[63{end}',*[o+ f'{esc}[63{end}' for o in obj],f'{esc}[65{end}' ])
67+
def IdeogramStress (*obj) -> str: return ''.join([f'{esc}[64{end}',*[o+ f'{esc}[64{end}' for o in obj],f'{esc}[65{end}' ])
68+
def NoIdeogram (*obj) -> str: return ''.join([f'{esc}[65{end}',*[o+ f'{esc}[65{end}' for o in obj],f'' ])
69+
def SuperScript (*obj) -> str: return ''.join([f'{esc}[73{end}',*[o+ f'{esc}[73{end}' for o in obj],f'{esc}[75{end}' ])
70+
def SubScript (*obj) -> str: return ''.join([f'{esc}[74{end}',*[o+ f'{esc}[74{end}' for o in obj],f'{esc}[75{end}' ])
71+
def NoScript (*obj) -> str: return ''.join([f'{esc}[75{end}',*[o+ f'{esc}[75{end}' for o in obj],f'' ])
72+
73+
# ? 76 - 89
74+
75+
# 90 - 97 see Basic
76+
# 100 - 107 see Basic
77+
78+
class Basic:
79+
class Fore:
80+
def Black (*obj) -> str: return ''.join([f"{esc}[30m", *[o+f"{esc}[30m" for o in obj], f'{esc}[39m'])
81+
def Red (*obj) -> str: return ''.join([f"{esc}[31m", *[o+f"{esc}[31m" for o in obj], f'{esc}[39m'])
82+
def Green (*obj) -> str: return ''.join([f"{esc}[32m", *[o+f"{esc}[32m" for o in obj], f'{esc}[39m'])
83+
def Yellow (*obj) -> str: return ''.join([f"{esc}[33m", *[o+f"{esc}[33m" for o in obj], f'{esc}[39m'])
84+
def Blue (*obj) -> str: return ''.join([f"{esc}[34m", *[o+f"{esc}[34m" for o in obj], f'{esc}[39m'])
85+
def Magenta (*obj) -> str: return ''.join([f"{esc}[35m", *[o+f"{esc}[35m" for o in obj], f'{esc}[39m'])
86+
def Cyan (*obj) -> str: return ''.join([f"{esc}[36m", *[o+f"{esc}[36m" for o in obj], f'{esc}[39m'])
87+
def White (*obj) -> str: return ''.join([f"{esc}[37m", *[o+f"{esc}[37m" for o in obj], f'{esc}[39m'])
88+
def BrightBlack (*obj) -> str: return ''.join([f"{esc}[90m", *[o+f"{esc}[90m" for o in obj], f'{esc}[39m'])
89+
def BrightRed (*obj) -> str: return ''.join([f"{esc}[91m", *[o+f"{esc}[91m" for o in obj], f'{esc}[39m'])
90+
def BrightGreen (*obj) -> str: return ''.join([f"{esc}[92m", *[o+f"{esc}[92m" for o in obj], f'{esc}[39m'])
91+
def BrightYellow (*obj) -> str: return ''.join([f"{esc}[93m", *[o+f"{esc}[93m" for o in obj], f'{esc}[39m'])
92+
def BrightBlue (*obj) -> str: return ''.join([f"{esc}[94m", *[o+f"{esc}[94m" for o in obj], f'{esc}[39m'])
93+
def BrightMagenta (*obj) -> str: return ''.join([f"{esc}[95m", *[o+f"{esc}[95m" for o in obj], f'{esc}[39m'])
94+
def BrightCyan (*obj) -> str: return ''.join([f"{esc}[96m", *[o+f"{esc}[96m" for o in obj], f'{esc}[39m'])
95+
def BrightWhite (*obj) -> str: return ''.join([f"{esc}[97m", *[o+f"{esc}[97m" for o in obj], f'{esc}[39m'])
96+
97+
class Back:
98+
def Black (*obj) -> str: return ''.join([f"{esc}[40m" , *[o+f"{esc}[40m" for o in obj], f'{esc}[49m'])
99+
def Red (*obj) -> str: return ''.join([f"{esc}[41m" , *[o+f"{esc}[41m" for o in obj], f'{esc}[49m'])
100+
def Green (*obj) -> str: return ''.join([f"{esc}[42m" , *[o+f"{esc}[42m" for o in obj], f'{esc}[49m'])
101+
def Yellow (*obj) -> str: return ''.join([f"{esc}[43m" , *[o+f"{esc}[43m" for o in obj], f'{esc}[49m'])
102+
def Blue (*obj) -> str: return ''.join([f"{esc}[44m" , *[o+f"{esc}[44m" for o in obj], f'{esc}[49m'])
103+
def Magenta (*obj) -> str: return ''.join([f"{esc}[45m" , *[o+f"{esc}[45m" for o in obj], f'{esc}[49m'])
104+
def Cyan (*obj) -> str: return ''.join([f"{esc}[46m" , *[o+f"{esc}[46m" for o in obj], f'{esc}[49m'])
105+
def White (*obj) -> str: return ''.join([f"{esc}[47m" , *[o+f"{esc}[47m" for o in obj], f'{esc}[49m'])
106+
def BrightBlack (*obj) -> str: return ''.join([f"{esc}[100m", *[o+f"{esc}[100m" for o in obj], f'{esc}[49m'])
107+
def BrightRed (*obj) -> str: return ''.join([f"{esc}[101m", *[o+f"{esc}[101m" for o in obj], f'{esc}[49m'])
108+
def BrightGreen (*obj) -> str: return ''.join([f"{esc}[102m", *[o+f"{esc}[102m" for o in obj], f'{esc}[49m'])
109+
def BrightYellow (*obj) -> str: return ''.join([f"{esc}[103m", *[o+f"{esc}[103m" for o in obj], f'{esc}[49m'])
110+
def BrightBlue (*obj) -> str: return ''.join([f"{esc}[104m", *[o+f"{esc}[104m" for o in obj], f'{esc}[49m'])
111+
def BrightMagenta (*obj) -> str: return ''.join([f"{esc}[105m", *[o+f"{esc}[105m" for o in obj], f'{esc}[49m'])
112+
def BrightCyan (*obj) -> str: return ''.join([f"{esc}[106m", *[o+f"{esc}[106m" for o in obj], f'{esc}[49m'])
113+
def BrightWhite (*obj) -> str: return ''.join([f"{esc}[107m", *[o+f"{esc}[107m" for o in obj], f'{esc}[49m'])
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
126+
127+
128+
129+

0 commit comments

Comments
 (0)