mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-02 02:38:30 +02:00
added @ operator shortcut for MKWColor to color a text
This commit is contained in:
parent
92f32aec80
commit
32efccbd60
1 changed files with 3 additions and 0 deletions
|
@ -42,6 +42,9 @@ class MKWColor:
|
|||
"""
|
||||
return f'{self.raw}{text}{get(bmg="off").raw}'
|
||||
|
||||
def __matmul__(self, other: str) -> str: # the operator @. Example : MKWColor.get(bmg="white") @ "text_to_color"
|
||||
return self.color_text(other)
|
||||
|
||||
|
||||
all_colors: list[MKWColor] = [
|
||||
MKWColor(bmg="white", hexadecimal=0xFFFFFF, name="white"),
|
||||
|
|
Loading…
Reference in a new issue