All Projects → MasterOdin → Crayons

MasterOdin / Crayons

Licence: mit
Text UI colors for Python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Crayons

Decoro
Android library designed for automatic formatting of text input by custom rules
Stars: ✭ 325 (-20.54%)
Mutual labels:  text
Android Text
Migrated:
Stars: ✭ 358 (-12.47%)
Mutual labels:  text
Replace In File
A simple utility to quickly replace contents in one or more files
Stars: ✭ 369 (-9.78%)
Mutual labels:  text
Nord Dircolors
An arctic, north-bluish clean and elegant dircolors theme.
Stars: ✭ 328 (-19.8%)
Mutual labels:  colors
Artificial Adversary
🗣️ Tool to generate adversarial text examples and test machine learning models against them
Stars: ✭ 348 (-14.91%)
Mutual labels:  text
Matchzoo Py
Facilitating the design, comparison and sharing of deep text matching models.
Stars: ✭ 362 (-11.49%)
Mutual labels:  text
React Color Extractor
A React component which extracts colors from an image
Stars: ✭ 314 (-23.23%)
Mutual labels:  colors
Dbreeze
C# .NET MONO NOSQL ( key value store embedded ) ACID multi-paradigm database management system.
Stars: ✭ 383 (-6.36%)
Mutual labels:  text
Dknightversion
Manage Colors, Integrate Night/Multiple Themes. (Unmaintained)
Stars: ✭ 3,559 (+770.17%)
Mutual labels:  colors
Beeftext
A text snippet tool for Windows.
Stars: ✭ 366 (-10.51%)
Mutual labels:  text
Image Palette
Generate a WCAG compliant color theme from any image
Stars: ✭ 331 (-19.07%)
Mutual labels:  colors
Tailwindcolorshades
Color shades generator for TailwindCSS - https://javisperez.github.io/tailwindcolorshades
Stars: ✭ 345 (-15.65%)
Mutual labels:  colors
Nlp
[UNMANTEINED] Extract values from strings and fill your structs with nlp.
Stars: ✭ 367 (-10.27%)
Mutual labels:  text
Lavalamp
A text editor theme that visually differentiates languages.
Stars: ✭ 328 (-19.8%)
Mutual labels:  colors
Web Highlighter
✨ A no-runtime dependency lib for text highlighting & persistence on any website ✨🖍️
Stars: ✭ 373 (-8.8%)
Mutual labels:  text
Fitty
✨ Makes text fit perfectly
Stars: ✭ 3,321 (+711.98%)
Mutual labels:  text
Textillate
A jquery plugin for CSS3 text animations.
Stars: ✭ 3,590 (+777.75%)
Mutual labels:  text
Lmdb Embeddings
Fast word vectors with little memory usage in Python
Stars: ✭ 404 (-1.22%)
Mutual labels:  text
Mle
Flexible terminal-based text editor (C)
Stars: ✭ 378 (-7.58%)
Mutual labels:  text
Sorted Colors
A tool to sort the named CSS colors in a way that it shows related colors together
Stars: ✭ 167 (-59.17%)
Mutual labels:  colors

Crayons: Text UI colors for Python.

.. image:: https://img.shields.io/pypi/v/crayons.svg :target: https://pypi.org/project/crayons/

.. image:: https://github.com/MasterOdin/crayons/workflows/Test/badge.svg :target: https://github.com/MasterOdin/crayons/actions?query=workflow%3ATest+branch%3Amaster

.. image:: https://img.shields.io/pypi/l/crayons.svg :target: https://pypi.python.org/pypi/crayons

.. image:: https://img.shields.io/pypi/wheel/crayons.svg :target: https://pypi.python.org/pypi/crayons

.. image:: https://img.shields.io/pypi/pyversions/crayons.svg :target: https://pypi.python.org/pypi/crayons

This module is really simple, it gives you colored strings for terminal usage. Included colors are red, green, yellow, blue, black, magenta, cyan, white, and normal (as well as clean and disable).

Crayons is nice because it automatically wraps a given string in both the foreground color, as well as returning to the original state after the string is complete. Most terminal color libraries make you manage this yourself.

.. image:: https://d3vv6lp55qjaqc.cloudfront.net/items/3q0I293q1z293R3a3a3n/Screen%20Shot%202017-01-23%20at%206.00.02%20PM.png?X-CloudApp-Visitor-Id=2577

Arguments include always=True and bold=True.

Features

  • If you call disable(), all future calls to colors will be ignored.
  • If you call normal(), color is reset to default foreground color
  • If the current process is not in a TTY (e.g. being piped), no colors will be displayed.
  • Length of ColoredStrings can be properly calculated.
  • Powered by colorama.

Usage is simple

::

# red is red, white is white.
>>> print('{} white'.format(crayons.red('red')))
red white

That's it!

Installation

::

$ pip install crayons
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].