User Tools

Site Tools


bash:colors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
bash:colors [2021/01/09 12:22] peterbash:colors [2021/01/09 13:34] (current) peter
Line 7: Line 7:
 [[BASH:Colors:8-bit Colors|8-bit Colors]] [[BASH:Colors:8-bit Colors|8-bit Colors]]
  
-[[BASH:Colors:8-bit Colors|8-bit Colors]]+[[BASH:Colors:24-bit RGB Colors|24-bit RGB Colors]]
  
 ---- ----
- 
- 
-|No Color|0| 
-|Black|0;30|Dark Gray|1;30| 
-|Red|0;31|Light Red|1;31| 
-|Green|0;32|Light Green|1;32| 
-|Brown/Orange|0;33|Yellow|1;33| 
-|Blue|0;34|Light Blue|1;34| 
-|Purple|0;35|Light Purple|1;35| 
-|Cyan|0;36|Light Cyan|1;36| 
-|Light Gray|0;37|White|1;37| 
- 
----- 
- 
-===== Red Example ===== 
- 
-<code bash> 
-echo -e "\033[0;31mThis is in RED" 
-</code> 
- 
----- 
- 
-===== Red Blue ===== 
- 
- 
- 
-<code bash> 
-echo -e "\033[0;31mThis is in RED\033[0;34mThis is in Blue" 
-</code> 
- 
----- 
- 
-[[BASH:Colors|Colors]] 
- 
-===== ANSI Rainbow ===== 
- 
-<code bash> 
-for (( i = 30; i < 38; i++ )); do echo -e "\033[0;"$i"m Normal: (0;$i); \033[1;"$i"m Light: (1;$i)"; done 
-</code> 
- 
----- 
- 
-===== ANSI Rainbow with more colours ===== 
- 
-<code bash> 
-for (( i = 0; i < 16; i++ )); do echo -e "\033[38;5;"$i"mHello"; done 
-</code> 
- 
----- 
- 
- 
  
 ===== References ===== ===== References =====
  
 https://en.wikipedia.org/wiki/ANSI_escape_code https://en.wikipedia.org/wiki/ANSI_escape_code
bash/colors.1610194956.txt.gz · Last modified: 2021/01/09 12:22 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki