Files
cshenv/tcshrc.colors
ADAM David Alan Martin 856fd35085 This sets me up to do more adaptive colours with the prompt.
Colours now can use 24-bit colour sequences.

A script drives the generation of SGR codes...  Now I just have
to integrate this into `tcshrc.prompt.final`, for dynamic updating.
2022-06-04 08:56:40 -04:00

87 lines
2.8 KiB
Tcsh
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#######################
####### COLOURS #######
#######################
set csi='['
# Legacy 3-bit ANSI Forms:
set ansi_bright='1'
set ansi_dim='0'
set ansi_color='m'
set ansi_reverse='7'
set ansi_black='30'
set ansi_red='31'
set ansi_green='32'
set ansi_yellow='33'
set ansi_blue='34'
set ansi_magenta='35'
set ansi_cyan='36'
set ansi_white='37'
set bright="$csi$ansi_bright$ansi_color"
set dim="$csi$ansi_dim$ansi_color"
set reverse="$csi$ansi_reverse$ansi_color"
set blink="${csi}5${ansi_color}"
set black="$csi$ansi_black$ansi_color"
set red="$csi$ansi_red$ansi_color"
set green="$csi$ansi_green$ansi_color"
set yellow="$csi$ansi_yellow$ansi_color"
set blue="$csi$ansi_blue$ansi_color"
set magenta="$csi$ansi_magenta$ansi_color"
set cyan="$csi$ansi_cyan$ansi_color"
set white="$csi$ansi_white$ansi_color"
# Bright and Dim rely upon the console's setting of colour intensity paired
# to boldness intensity. For better colour choices, it's better to use
# extended colours or true colours.
set dim_black="$csi$ansi_dim;$ansi_black$ansi_color"
set dim_red="$csi$ansi_dim;$ansi_red$ansi_color"
set dim_green="$csi$ansi_dim;$ansi_green$ansi_color"
set dim_yellow="$csi$ansi_dim;$ansi_yellow$ansi_color"
set dim_blue="$csi$ansi_dim;$ansi_blue$ansi_color"
set dim_magenta="$csi$ansi_dim;$ansi_magenta$ansi_color"
set dim_cyan="$csi$ansi_dim;$ansi_cyan$ansi_color"
set dim_white="$csi$ansi_dim;$ansi_white$ansi_color"
set bright_black="$csi$ansi_bright;$ansi_black$ansi_color"
set bright_red="$csi$ansi_bright;$ansi_red$ansi_color"
set bright_green="$csi$ansi_bright;$ansi_green$ansi_color"
set bright_yellow="$csi$ansi_bright;$ansi_yellow$ansi_color"
set bright_blue="$csi$ansi_bright;$ansi_blue$ansi_color"
set bright_magenta="$csi$ansi_bright;$ansi_magenta$ansi_color"
set bright_cyan="$csi$ansi_bright;$ansi_cyan$ansi_color"
set bright_white="$csi$ansi_bright;$ansi_white$ansi_color"
# Also somewhat legacy are the extended colours... so I'm not implementing them.
# Instead, I'll use my script which does math on the 6 char hex string you use in
# colors...
#################################
# Extended 8-bit colour Support #
#################################
#######################
# True colour support #
#######################
# The idea behind a true colour variable is that you run: `color_from_hex ff0077` and it expands to
# a proper colour sequence for a 24-bit color. The shell script which computes these will also attempt to
# compute a rounded version of your color for use with 8-bit color and a weaker rounded form for use
# with 3 and 4 bit color.
# You process true colour by evaluating `__make_color_sequence` on the environment variable.
alias __make_color_sequence ${CSHENV_DIR}/bin/__hex_to_ansi
###########################
# vim:filetype=tcsh
###########################