App-ansiecho
view release on metacpan or search on metacpan
## COLOR and EFFECT
You can specify color of each argument by preceding with **-c** option:
ansiecho -c R foo -c GI bar -c BD baz
This command print strings `foo`, `bar` and `baz` according to the
color spec of `R` (Red), `GI` (_Green Italic_) and `BD` (**Blue
Bold**) respectively.
Foreground and background color is specified in the form of
`fore/back`.
ansiecho -c B/M 'Blue on Magenta' -c '<pink>/<salmon>' fish
Color can be described by 8+8 standard colors, 24 gray scales, 6x6x6
216 colors, RGB values or color names, with special effects such as I
(Italic), D (Double-struck; Bold), S (Stand-out; Reverse Video) and
such. More information is described in ["COLOR SPEC"](#color-spec) section.
## FORMAT
prints `34 12 34`, but don't be surprised. When using position
specifiers, it is safe to use them for all arguments.
If you are using perl v5.24 or later, you can also use reordered
precision arguments.
## ANSI SEQUENCE
To get desired ANSI sequence, use **-s** option. Next example produce
ANSI terminal sequence to indicate `deeppink` color on `lightyellow`
background.
ansiecho -n -s '<deeppink>/<lightyellow>'
You will get the next result for the 256-color terminal:
^[[38;5;198;48;5;230m
and the next for the full-color terminal:
^[[38;2;255;20;147;48;2;255;255;224m
U 4 Underline
F 5 Flash (blink: slow)
Q 6 Quick (blink: rapid)
S 7 Stand out (reverse video)
H 8 Hide (concealed)
X 9 Cross out
E Erase Line
; No effect
/ Toggle foreground/background
^ Reset to foreground
~ Cancel following effect
Samples:
RGB 6x6x6 12bit 24bit color name
=== ======= ========= ============= ==================
B 005 #00F (0,0,255) <blue>
/M /505 /#F0F /(255,0,255) /<magenta>
K/W 000/555 #000/#FFF 000000/FFFFFF <black>/<white>
script/ansiecho view on Meta::CPAN
=head2 COLOR and EFFECT
You can specify color of each argument by preceding with B<-c> option:
ansiecho -c R foo -c GI bar -c BD baz
This command print strings C<foo>, C<bar> and C<baz> according to the
color spec of C<R> (Red), C<GI> (I<Green Italic>) and C<BD> (B<Blue
Bold>) respectively.
Foreground and background color is specified in the form of
C<fore/back>.
ansiecho -c B/M 'Blue on Magenta' -c '<pink>/<salmon>' fish
Color can be described by 8+8 standard colors, 24 gray scales, 6x6x6
216 colors, RGB values or color names, with special effects such as I
(Italic), D (Double-struck; Bold), S (Stand-out; Reverse Video) and
such. More information is described in L<COLOR SPEC> section.
=head2 FORMAT
script/ansiecho view on Meta::CPAN
prints C<34 12 34>, but don't be surprised. When using position
specifiers, it is safe to use them for all arguments.
If you are using perl v5.24 or later, you can also use reordered
precision arguments.
=head2 ANSI SEQUENCE
To get desired ANSI sequence, use B<-s> option. Next example produce
ANSI terminal sequence to indicate C<deeppink> color on C<lightyellow>
background.
ansiecho -n -s '<deeppink>/<lightyellow>'
You will get the next result for the 256-color terminal:
^[[38;5;198;48;5;230m
and the next for the full-color terminal:
^[[38;2;255;20;147;48;2;255;255;224m
script/ansiecho view on Meta::CPAN
U 4 Underline
F 5 Flash (blink: slow)
Q 6 Quick (blink: rapid)
S 7 Stand out (reverse video)
H 8 Hide (concealed)
X 9 Cross out
E Erase Line
; No effect
/ Toggle foreground/background
^ Reset to foreground
~ Cancel following effect
Samples:
RGB 6x6x6 12bit 24bit color name
=== ======= ========= ============= ==================
B 005 #00F (0,0,255) <blue>
/M /505 /#F0F /(255,0,255) /<magenta>
K/W 000/555 #000/#FFF 000000/FFFFFF <black>/<white>
( run in 0.607 second using v1.01-cache-2.11-cpan-d8267643d1d )