Skip to content

🌈 Splash your command line with vibrant hues! 🎨

License

Notifications You must be signed in to change notification settings

Velox0/colourize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

60 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

wrench Currently a work in progress

depends on libclr


colourise text based on string pattern

Overview

Colourize allows you to easily colourise text streams based on specified string patterns. It is designed to provide a simple yet powerful way to add custom colors to different parts of your text.

Usage

The program looks for specific strings specified after certain arguments such as --after, --from, and --reset-on and formats them with the specified color. Here's an example:

stat image.png | clr red --after ": " green --reset-on "  "

This command outputs the standard input in red. After encountering : , it formats the subsequent string in green. It then resets to red after encountering two consecutive spaces .

By default, the color definitions are read from ~/.config/colourize/preset.

Example

stat README.md | clr bright_red --after Access: 55ccff

Valid colours include hexadecimal colours and black, red, green, yellow, blue, magenta, cyan, white, bright_black, bright_red, bright_green, and so on.

Customization

To customize color presets, you can modify the configuration file located at ~/.config/colourize/preset. This file defines the default color mappings.

Installation

Make sure you have libclr installed. Then run ./install.sh.

TODO

  • fix kmp implementation
  • config file support
  • --match option; only colour matching string

Note: The tool is currently under development, and improvements are ongoing.

About

🌈 Splash your command line with vibrant hues! 🎨

Resources

License

Stars

Watchers

Forks

Packages

No packages published