[Figure] color output in Linux

Source: Internet
Author: User
[Figure] Linux Terminal color output-General Linux technology-Linux programming and kernel information. The following is a detailed description. The Linux command line can also generate colorful fonts and patterns, just add some color code, such

Echo-e "\ 033 [41; 36 m red green character \ 033 [0 m"
The position 41 represents the background color, and the position 36 represents the color of the word.

The ascii code is the beginning and end of the color call.

\ 033 [; m ...... \ 033 [0 m
Color range: 40----49
40: Black
41: dark red
42: Green
43: Yellow
44: Blue
45: Purple
46: dark green
47: White
Color: 30-----------39
30: Black
31: Red
32: Green
33: Yellow
34: Blue
35: Purple
36: dark green
37: White
========================================================== ======= ANSI control code description
\ 33 [0 m close all properties
\ 33 [1 m set high brightness
\ 33 [4 m underline
\ 33 [5 m flashing
\ 33 [7 m reverse display
\ 33 [8 m blanking
\ 33 [30 m -- \ 33 [37 m sets the foreground color
\ 33 [40 m -- \ 33 [47 m set the background color
\ 33 [move the nA cursor up n rows
\ 33 [move the nB cursor down n rows
\ 33 [move the nC cursor right n rows
\ 33 [nD cursor shifts n rows left
\ 33 [y; xH: Set the cursor position
\ 33 [2J clear screen
\ 33 [K clear content from cursor to end of line
\ 33 [s save the cursor position
\ 33 [u Restore cursor position
\ 33 [? 25l hide the cursor
\ 33 [? 25 h show cursor

A checkerboard under shell is provided.



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('http: // www.linuxboss.cn/uploads/allianz 090310/20262r329-0.jpg'); ">
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.