Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/python/rich/rich/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 3 kB image not shown  

Quelle  terminal_theme.py

  Sprache: Python
 

from typing import List, Optional, Tuple

from .color_triplet import ColorTriplet
from .palette import Palette

_ColorTuple = Tuple[int, int, int]


class TerminalTheme:
    """A color theme used when exporting console content.

    Args:
        background (Tuple[int, int, int]): The background color.
        foreground (Tuple[int, int, int]): The foreground (text) color.
        normal (List[Tuple[int, int, int]]): A list of 8 normal intensity colors.
        bright (List[Tuple[int, int, int]], optional): A list of 8 bright colors, or None
            to repeat normal intensity. Defaults to None.
    """

    def __init__(
        self,
        background: _ColorTuple,
        foreground: _ColorTuple,
        normal: List[_ColorTuple],
        bright: Optional[List[_ColorTuple]] = None,
    ) -> None:
        self.background_color = ColorTriplet(*background)
        self.foreground_color = ColorTriplet(*foreground)
        self.ansi_colors = Palette(normal + (bright or normal))


DEFAULT_TERMINAL_THEME = TerminalTheme(
    (255255255),
    (000),
    [
        (000),
        (12800),
        (01280),
        (1281280),
        (00128),
        (1280128),
        (0128128),
        (192192192),
    ],
    [
        (128128128),
        (25500),
        (02550),
        (2552550),
        (00255),
        (2550255),
        (0255255),
        (255255255),
    ],
)

MONOKAI = TerminalTheme(
    (121212),
    (217217217),
    [
        (262626),
        (244095),
        (15222436),
        (25315131),
        (157101255),
        (244095),
        (88209235),
        (196197181),
        (989476),
    ],
    [
        (244095),
        (15222436),
        (22421397),
        (157101255),
        (244095),
        (88209235),
        (246246239),
    ],
)
DIMMED_MONOKAI = TerminalTheme(
    (252525),
    (185188186),
    [
        (586167),
        (1906372),
        (13515459),
        (19716653),
        (79118161),
        (13392141),
        (87143164),
        (185188186),
        (136137135),
    ],
    [
        (251031),
        (1511447),
        (19611251),
        (24109227),
        (2510103),
        (46112109),
        (253255185),
    ],
)
NIGHT_OWLISH = TerminalTheme(
    (255255255),
    (646383),
    [
        (12239),
        (2116662),
        (42162152),
        (2181701),
        (72118214),
        (646383),
        (8145106),
        (122129129),
        (122129129),
    ],
    [
        (247110110),
        (73208197),
        (218194107),
        (92167228),
        (105112152),
        (0201144),
        (152159177),
    ],
)

SVG_EXPORT_THEME = TerminalTheme(
    (414141),
    (197200198),
    [
        (757885),
        (2048590),
        (15216875),
        (20817968),
        (96138177),
        (152114159),
        (104160179),
        (197200198),
        (154155153),
    ],
    [
        (2553839),
        (013061),
        (20813266),
        (25132233),
        (25544122),
        (57130128),
        (253253197),
    ],
)

Messung V0.5 in Prozent
C=96 H=97 G=96

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.