Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Echo sets the use of colors

Shulou Source: shulou.com Published: 2022-06-01 07:16:49 09月30日 Update

Echo display text

Echo sets the format of colors:

Echo-e "\ 033 [font background color; font color m string\ 033 [0m"

Font color

Echo-e "\ 033 [30m black words\ 033 [0m"

Echo-e "\ 033 [31m red word\ 033 [0m"

Echo-e "\ 033 [32m green word\ 033 [0m"

Echo-e "\ 033 [33m × × × words\ 033 [0m"

Echo-e "\ 033 [34m blue word\ 033 [0m"

Echo-e "\ 033 [35m purple word\ 033 [0m"

Echo-e "\ 033 [36m light blue\ 033 [0m"

Echo-e "\ 033 [37m White word\ 033 [0m"

Font background color

Echo-e "\ 033 [40m black\ 033 [0m"

Echo-e "\ 033 [41m Red\ 033 [0m"

Echo-e "\ 033 [42m green\ 033 [0m"

Echo-e "\ 033 [43m × ×\ 033 [0m"

Echo-e "\ 033 [44m Blue\ 033 [0m"

Echo-e "\ 033 [45m purple\ 033 [0m"

Echo-e "\ 033 [46m light blue\ 033 [0m"

Echo-e "\ 033 [47m White\ 033 [0m"

\ 033 [0m end

\ 033 [1m increase brightness

\ 033 [4m underline

\ 033 [5m flicker

Tags: Color font light blue white purple red green background blue black underline brightness character string text formatting Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Docker Xiaomi Apple Shulou Technology