Skip to main content

256-color terminal text formatter

Project description

bruhcolor

Supported Python versions Downloads Downloads Downloads PyPI version License

bruhcolor is a Python package that allows you to color text in the terminal. It supports both 8-color and 256-color formatting, providing a wide range of colors to choose from. The package is available on PYPI and is licensed under the MIT license.

Installation

To install bruhcolor, you can use pip:

pip install bruhcolor

Usage

To use bruhcolor, simply import the bruhcolored function from the package:

from bruhcolor import bruhcolored

You can then use the bruhcolored function to color your text. Here's an example:

colored_text = bruhcolored("Hello world!", color="red", on_color=194, attrs=["bold", "blink"])

print(colored_text)

This will output the text "Hello world!" in red color, with a background color of 194 and the attributes "bold" and "blink" applied.

Available Colors

bruhcolor supports a wide range of colors. You can use either the 8-color or 256-color formatting. Here are some examples of available colors:

  • 8-color: black, grey, red, green, yellow, blue, magenta, cyan, light_grey, dark_grey, light_red, light_green, light_yellow, light_blue, light_magenta, light_cyan, white
  • 256-color: You can use any number between 0 and 255 to specify a color.

To see a full list of available colors, you can use the colors function:

from bruhcolor import colors

colors(support="full")

This will print out all the available colors.

Available Attributes

bruhcolor also supports various attributes that you can apply to your text. Here are some examples of available attributes:

  • bold
  • dark
  • italic
  • underline
  • blink
  • reverse
  • concealed
  • crossed-out

To see a full list of available attributes, you can use the valid_effects function:

from bruhcolor import valid_effects

valid_effects()

This will print out all the available attributes.

License

bruhcolor is licensed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bruhcolor-0.0.65.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bruhcolor-0.0.65-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file bruhcolor-0.0.65.tar.gz.

File metadata

  • Download URL: bruhcolor-0.0.65.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.13.7 Windows/11

File hashes

Hashes for bruhcolor-0.0.65.tar.gz
Algorithm Hash digest
SHA256 806cbdf53804f52a07c663bd8f384bc65866553f48e14c16972fab393dd1092a
MD5 e3f384f7e83c5de187ae72aa4b3b3431
BLAKE2b-256 a627e6a88f6a398d08ddf8e1a3cb02147a69d6b68782a091d2af6df6cad4b860

See more details on using hashes here.

File details

Details for the file bruhcolor-0.0.65-py3-none-any.whl.

File metadata

  • Download URL: bruhcolor-0.0.65-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.13.7 Windows/11

File hashes

Hashes for bruhcolor-0.0.65-py3-none-any.whl
Algorithm Hash digest
SHA256 481aaaf12660a5a4439deb17e1fb4b7a7cb57716bc3701c0564e1806408c1098
MD5 f96ec9417f3d21aa46e58980b943e4c1
BLAKE2b-256 78a22fcc2ea6b88eb903bdffd66eb25cba646af8b8d73853e35bcbf41caed41c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page