-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclasses.py
33 lines (29 loc) · 880 Bytes
/
classes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright (c) 2024 Kaan Gönüldinc
# This file is part of SmartSweep Precision.
# It is subject to the terms and conditions of the CC BY-NC-ND 4.0 license.
# Import the `Enum` class from the `enum` library
from enum import Enum
# Define the `Color` class
class Color(Enum):
HEADER = "\033[95m"
WHITE = "\033[37m"
YELLOW = "\033[33m"
GREEN = "\033[32m"
BLUE = "\033[34m"
CYAN = "\033[36m"
PURPLE = "\033[35m"
RED = "\033[31m"
MAGENTA = "\033[35m"
GREY = "\033[30m"
LIGHTBLUE = "\033[94m"
LIGHTCYAN = "\033[96m"
LIGHTGREEN = "\033[92m"
WARNING = "\033[93m"
FAIL = "\033[91m"
ENDC = "\033[0m"
BOLD = "\033[1m"
UNDERLINE = "\033[4m"
# Defining the `colorize` method to colorize text
@classmethod
def colorize(cls, text: str, color: "Color"):
return color.value + text + cls.ENDC.value