Code Monkey home page Code Monkey logo

bruhcolor's Introduction

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.

bruhcolor's People

Contributors

ethanlchristensen avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

bruhcolor's Issues

Update README

Update the readme example code to reflect the output picture.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.