aboutsummaryrefslogtreecommitdiffstats
path: root/colorize.1
blob: 186293094fbf3b48571f1c468e803646ba47828d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.TH COLORIZE 1 "2015-03-02" "colorize v0.60" "User Commands"
.SH NAME
colorize \- colorize text with escape sequences
.SH SYNOPSIS
\fBcolorize\fR [\fIoption\fR] (\fIforeground\fR) [\fIfile\fR]
.PP
\fBcolorize\fR [\fIoption\fR] (\fIforeground\fR)/(\fIbackground\fR) [\fIfile\fR]
.PP
\fBcolorize\fR \-\-clean[\-all] [\fIfile\fR]
.PP
\fBcolorize\fR \-hV
.SH DESCRIPTION
Colorizes text read from standard input stream or file by using ANSI
escape sequences (and also vice versa, i.e. cleaning text from sequences)
and prints resulting output to the terminal.
.PP
When colorizing text, (foreground) and eventually (background) may be either
one of following color values: none, black, red, green, yellow, blue, magenta,
cyan, white, default or random.  First character of color name in upper
case denotes increased intensity, whereas for lower case colors will be of
normal intensity.  If "none" is chosen, no escape sequences will be emitted.
.PP
Color escape sequences are added per each line, hence colored lines can be
safely extracted.
.PP
When de-colorizing text, \-\-clean omits color escape sequences which
were emitted by colorize (see NOTES for list), whereas \-\-clean\-all
omits all valid ones.  If in doubt, consider using \-\-clean\-all.
.SH OPTIONS
.TP
.BR \-\-clean
clean text from color escape sequences emitted by colorize
.TP
.BR \-\-clean\-all
clean text from all valid color escape sequences
.TP
.BR \-\-exclude\-random=\fICOLOR\fR
text color to be excluded when selecting a random foreground color
.TP
.BR \-h ", " \-\-help
show help screen and exit
.TP
.BR \-V ", " \-\-version
display version data and exit
.SH NOTES
The list of color escape sequence codes being emitted and omitted is
as follows:
.IP * 4
30-37,39 (foreground colors)
.IP * 4
1;30-37,39 (bold foreground colors)
.IP * 4
40-47,49 (background colors)
.IP * 4
0 (reset)
.SH AUTHOR
Steven Schubiger <stsc@refcnt.org>