dye is a tool to easily color text in shell.

Overview

GitHub Contributors Stars Build Status Downloads Crates.io

Dye

dye is a tool to easily color text in shell.

Usage

See the gif below to see these commands in action.

echo $(dye --red WARN) This tool will knock your socks off.

echo $(dye -r WARN) It takes too many characters to type --red, so every display modifier has a shortcode.

echo $(dye -cl INFO) If your shell supports it, this label will be *blinking*. How cool is that?

echo $(dye --cyan INFO) Lowercase letter options modify the text, uppercase modifies the $(dye -R --black background).

echo $(dye -g SUCCESS) You are a $(dye -u great) engineer for using tools that make your life simpler and easier.

gif of dye example usage

Installation

cargo install dye-cli

Documentation

The --help option gives you all you need to know. Lowercase short options affect foreground color and style, and uppercase short options affect the background.

Add color to text. Pass text as arguments (like the echo command), or pass no arguments to read
stdin.

USAGE:
    dye [OPTIONS] [string]...

OPTIONS:
    -b, --blue         Set foreground blue
    -B, --bgblue       Set background blue
    -c, --cyan         Set foreground cyan
    -C, --bgcyan       Set background cyan
    -d, --bold         Add bold style
    -g, --green        Set foreground green
    -G, --bggreen      Set background green
    -h, --help         Print help information
    -i, --italic       Add italic style
    -k, --black        Set foreground black
    -K, --bgblack      Set background black
    -l, --blink        Add blink style
    -m, --dimmed       Add dimmed style
    -p, --purple       Set foreground purple
    -P, --bgpurple     Set background purple
    -r, --red          Set foreground red
    -R, --bgred        Set background red
    -u, --underline    Add underline style
    -v, --reversed     Add reversed style
    -V, --version      Print version information
    -w, --white        Set foreground white
    -W, --bgwhite      Set background white
    -y, --yellow       Set foreground yellow
    -Y, --bgyellow     Set background yellow

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Acknowledgments

This project is built on the great work in these projects:

  • colored does the heavy lifting of setting color escape codes.
  • clap makes creating CLIs in Rust easy!

(back to top)

You might also like...
A tool to easily work with timezone lookups via a binary, a library, or a server.
A tool to easily work with timezone lookups via a binary, a library, or a server.

rtz A self-contained geo lookup library / binary / server for Rust / JS (via WASM) (free server) using data from the Natural Earth and OpenStreetMap d

A dead simple ANSI terminal color painting library for Rust.

yansi A dead simple ANSI terminal color painting library for Rust. use yansi::Paint; print!("{} light, {} light!", Paint::green("Green"), Paint::red(

`ls` alternative with useful info and a splash of color 🎨
`ls` alternative with useful info and a splash of color 🎨

🎨 Natls 🎨 Why Natls? Showing file permissions Showing file size Showing the date that the file was modified last Showing the user that the file belo

Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.
Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and at compile-time.

rgb2ansi256 rgb2ansi256 is a small Rust library to convert RGB 24-bit colors into ANSI 256 (8-bit) color codes with zero dependencies and const fn. Th

Detects whether a terminal supports color, and gives details about that support

Detects whether a terminal supports color, and gives details about that support. It takes into account the NO_COLOR environment variable. This crate i

Parse hex colors to tui::style::Color

Color - Tui Parse hex colors to tui rgb colors #c3f111 - Color::Rgb(195,241,17) Note that the indexed colors are NOT HEX #142 - Color::Indexed(142)

Tiny color conversion library for TUI application builders
Tiny color conversion library for TUI application builders

Definition of ANSI, RGB and HSL color types and all the conversions between them. There are many other color conversion crates. This one may be useful

Sanctity is an acronym for rust ansi16 color test utility
Sanctity is an acronym for rust ansi16 color test utility

sanctity 🌈 sanctity is an acronym for rust ansi16 color test utility. It prints your own text or the default text in all of the 16 terminal colors.

An abstract, safe, and concise color conversion library for rust nightly This requires the feature adt_const_params

colortypes A type safe color conversion library This crate provides many methods for converting between color types. Everything is implemented abstrac

Releases(v0.4.2)
Owner
Kurt Wolf
Kurt Wolf
A command line tool for playing with color gradients

gradient A command-line tool for playing with color gradients. Features Lots of preset gradients. Custom gradient. Read gradients from SVG & GIMP grad

Nor Khasyatillah 96 Dec 28, 2022
An implementation of Piet's text interface using cosmic-text

piet-cosmic-text Implements piet's Text interface using the cosmic-text crate. License piet-cosmic-text is free software: you can redistribute it and/

John Nunley 7 Mar 12, 2023
Shellcheck - a static analysis tool for shell scripts

ShellCheck - A shell script static analysis tool ShellCheck is a GPLv3 tool that gives warnings and suggestions for bash/sh shell scripts: The goals o

Vidar Holen 31.1k Jan 9, 2023
A command-line tool for patching shell scripts inspired by resholve

patsh A command-line tool for patching shell scripts inspired by resholve nix run github:nix-community/patsh -- -f script.sh Usage Usage: patsh [OPTIO

Nix community projects 23 Jan 7, 2023
Dreamer is an extensible tool manager and shell for creating small, lightweight, dev environments instantly.

Dreamer ?? Does what you want, not what you say. Dreamer is a universal tool management system for any language, any build system, and any framework.

Luke Davis 4 Oct 23, 2023
Scriptable tool to read and write UEFI variables from EFI shell. View, save, edit and restore hidden UEFI (BIOS) Setup settings faster than with the OEM menu forms.

UEFI Variable Tool (UVT) UEFI Variable Tool (UVT) is a command-line application that runs from the UEFI shell. It can be launched in seconds from any

null 4 Dec 11, 2023
A CLI companion tool for paste.misterio.me, allowing you to easily upload and manage your pastes

This is a CLI companion tool for paste.misterio.me, allowing you to easily upload and manage your pastes, as well as download any pastes you want.

Gabriel Fontes 1 Jan 26, 2022
A command line tool for easily generating multiple versions of a configuration file from a single template

MultiConf A command line tool for easily generating multiple versions of a configuration file from a single template. Why? I'm a big fan of the i3 win

Ian Clarke 4 Dec 10, 2022
A command-line tool to easily kill processes running on a specified port.

killport killport is a command-line utility for killing processes listening on specific ports. It's designed to be simple, fast, and effective. The to

Francisco Jiménez Cabrera 6 Mar 29, 2023
tmplt is a command-line interface tool that allows you to quickly and easily set up project templates for various programming languages and frameworks

tmplt A User Friendly CLI Tool For Creating New Projects With Templates About tmplt is a command-line tool that lets users quickly create new projects

Humble Penguin 35 Apr 8, 2023