An open API service indexing awesome lists of open source software.

https://github.com/layerex/term-invert-colors

A simple program for inverting color ANSI escape codes.
https://github.com/layerex/term-invert-colors

ansi-escape-codes cli colors escape-codes

Last synced: 5 months ago
JSON representation

A simple program for inverting color ANSI escape codes.

Awesome Lists containing this project

README

          

# term-invert-colors

A simple program for inverting [color ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors). I made this for finely viewing hardcoded colorschemes with light terminal background.

## Installation

First install [libansiescape](https://github.com/paultag/libansiescape/).

Then clone this repository and execute:

```sh
sudo make install
```

## Usage

```
Usage: term-invert-colors [-bg -fg -8 -8bg -8fg -b8 -b8bg -b8fg -16 -16bg -16fg -216 -216bg -216fg -grayscale -grayscalebg -grayscalefg -256 -256bg -256fg -rgb -rgbbg -rgbfg]
Flags specify which colors to invert. If no flags specified, all colors all inverted.
"bg" and "fg" flag suffixes specify whether to invert only background or only foreground colors respectively. Flags without such suffixes invert both background and foreground colors.
-fg All foreground colors.
-bg All background colors.
-8 8 standart colors.
-b8 8 bright colors.
-16 All colors of 16-color palette. Equal to -8 -b8.
-216 216 colors of color cube of 256-color palette.
-grayscale 24 shades of gray of 256-color palette.
-256 All colors of 256-color palette. Equal to -16 -216 -grayscale.
-rgb All rgb colors.
Take a look at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors if in doubt.
```