Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Colors

Help on module pydicts.colors in pydicts:

NAME
    pydicts.colors

FUNCTIONS
    blue(s)
        Returns a string formatted in bright blue color for terminal output.

        Args:
            s (any): The string or object to color.

        Returns:
            str: The colored string.

    currency_color(value, currency_, decimals=2)
        Returns a currency string formatted in green (for non-negative values) or red (for negative values).
        Non-numeric values are displayed in blue.

        Args:
            value (int, float, Decimal): The monetary value.
            currency_ (str): The currency code (e.g., "EUR").
            decimals (int, optional): The number of decimal places for formatting. Defaults to 2.

        Returns:
            str: The colored and formatted currency string.

    cyan(s)
        Returns a string formatted in bright cyan color for terminal output.

        Args:
            s (any): The string or object to color.

        Returns:
            str: The colored string.

    green(s)
        Returns a string formatted in bright green color for terminal output.

        Args:
            s (any): The string or object to color.

        Returns:
            str: The colored string.

    magenta(s)
        Returns a string formatted in bright magenta color for terminal output.

        Args:
            s (any): The string or object to color.

        Returns:
            str: The colored string.

    percentage_color(value, decimals=2)
        Returns a percentage string formatted in green (for non-negative values) or red (for negative values).
        Non-numeric values are displayed in blue.

        Args:
            value (int, float, Decimal): The percentage value (e.g., 0.12 for 12%).
            decimals (int, optional): The number of decimal places for formatting. Defaults to 2.

        Returns:
            str: The colored and formatted percentage string.

    red(s)
        Returns a string formatted in bright red color for terminal output.

        Args:
            s (any): The string or object to color.

        Returns:
            str: The colored string.

    value_color(value, decimals=2)
        Returns a numeric value formatted in green (for non-negative values) or red (for negative values).
        Non-numeric values are displayed in blue.

        Args:
            value (int, float, Decimal): The numeric value.
            decimals (int, optional): The number of decimal places for rounding. Defaults to 2.

        Returns:
            str: The colored and formatted value string.

    white(s)
        Returns a string formatted in bright white color for terminal output.

        Args:
            s (any): The string or object to color.

        Returns:
            str: The colored string.

    yellow(s)
        Returns a string formatted in bright yellow color for terminal output.

        Args:
            s (any): The string or object to color.

        Returns:
            str: The colored string.

DATA
    Fore = <colorama.ansi.AnsiFore object>
    Style = <colorama.ansi.AnsiStyle object>

FILE
    /opt/hostedtoolcache/Python/3.14.4/x64/lib/python3.14/site-packages/pydicts/colors.py