Quote:
Originally Posted by jone kim
Can anyone answer me the color code of the linux file system?
Especially, for those which have different colors in the background also like some have green background colors and are written in green some have yellow background and are written in black,why is it so?
Also please explain me the color code of other also.
|
If you mean how the colors are defined in a terminal, that would be through ANSI escape sequences as below:
Code:
# ANSI color escape sequences
# local NONE="\[\e[0m\]"
# normal colors
# local K="\[\e[0;30m\]" # dark black
# local R="\[\e[0;31m\]" # dark red
# local G="\[\e[0;32m\]" # dark green
# local Y='\[\e[0;33m\]" # dark yellow (brown)
# local B="\[\e[0;34m\]" # dark blue
# local M="\[\e[0;35m\]" # dark magenta
# local C="\[\e[0;36m\]" # dark cyan
# local W="\[\e[0;37m\]" # dark white (L.gray)
# bright (emphasized) colors
# local EK="\[\e[1;30m\]" # bright black (D.gray)
# local ER="\[\e[1;31m\]" # bright red
# local EG="\[\e[1;32m\]" # bright green
# local EY='\[\e[1;33m\]" # bright yellow
# local EB="\[\e[1;34m\]" # bright blue
# local EM="\[\e[1;35m\]" # bright magenta
# local EC="\[\e[1;36m\]" # bright cyan
# local EW="\[\e[1;37m\]" # bright white
# background colors
# local BK="\[\e[40m\]" # black
# local BR="\[\e[41m\]" # red
# local BG="\[\e[42m\] # green
# local BY="\[\e[43m\]" # yellow (brown)
# local BB="\[\e[44m\]" # blue
# local BM="\[\e[45m\]" # magenta
# local BC="\[\e[46m\]" #cyan
# local BW="\[\e[47m\]" # white (L.gray)
### put color selection and exports here
export USER_FORE_COLOR="\[\e[0;36m\]" # color for user Tom = dark cyan
export USER_BACK_COLOR="\[\e[0m\]" # no background color
Also see /etc/DIR_COLORS which controls what colors are used in commands such as ls.