summaryrefslogtreecommitdiffstats
path: root/typing-stubs/colored/colored.pyi
blob: 8a463ac9e643bb7a06735825946ecb7e0ab163f7 (plain)
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
from .hexadecimal import Hex as Hex
from .library import Library as Library
from .utilities import Utilities as Utilities
from _typeshed import Incomplete
from typing import Any

TTY_AWARE: bool
IS_TTY: Incomplete

class Colored:
    def __init__(self, name: Any) -> None: ...
    def attribute(self, line_color: str = '') -> str: ...
    def foreground(self) -> str: ...
    def background(self) -> str: ...
    @staticmethod
    def enable_windows_terminal_mode() -> Any: ...
    @staticmethod
    def enabled() -> bool: ...

def style(name: int | str, color: str | int = '') -> str: ...
def fore(name: int | str) -> str: ...
def back(name: int | str) -> str: ...
def fore_rgb(r: int | str, g: int | str, b: int | str) -> str: ...
def back_rgb(r: int | str, g: int | str, b: int | str) -> str: ...
def attr(name: int | str) -> str: ...
def fg(name: int | str) -> str: ...
def bg(name: int | str) -> str: ...
def stylize(text: str, formatting: int | str, reset: bool = True) -> str: ...
def stylize_interactive(text: str, formatting: str, reset: bool = True) -> str: ...
def set_tty_aware(awareness: bool = True) -> None: ...