#######color code########
# 字体颜色:30m-37m 黑、红、绿、黄、蓝、紫、青、白
BLACK="30m"
RED="31m"
GREEN="32m"
YELLOW="33m"
BLUE="34m"
FUCHSIA="35m"
SKYBLUE="36m"
WHITE="37m"
colorEcho() {
COLOR=$1
TEXT=$2
echo -e "\033[${COLOR}${TEXT}\033[0m"
}
# 示例用法
colorEcho $BLACK "This is a black text."
colorEcho $RED "This is a red text."
colorEcho $GREEN "This is a green text."
colorEcho $YELLOW "This is a yellow text."
colorEcho $BLUE "This is a blue text."
colorEcho $FUCHSIA "This is a fuchsia text."
colorEcho $SKYBLUE "This is a skyblue text."
colorEcho $WHITE "This is a white text."