-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
colours.txt
210 lines (174 loc) 路 6.39 KB
/
colours.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
Curses:
256 colours
32767 colour pairs allowed
Colour lists:
attach_headers MT_COLOR_ATTACH_HEADERS ColorAttachList
body MT_COLOR_BODY ColorBodyList
index MT_COLOR_INDEX ColorIndexList
index_author MT_COLOR_INDEX_AUTHOR ColorIndexAuthorList
index_flags MT_COLOR_INDEX_FLAGS ColorIndexFlagsList
index_subject MT_COLOR_INDEX_SUBJECT ColorIndexSubjectList
index_tag MT_COLOR_INDEX_TAG ColorIndexTagList
status MT_COLOR_STATUS ColorStatusList
General colours:
attachment MT_COLOR_ATTACHMENT
bold MT_COLOR_BOLD
error MT_COLOR_ERROR
hdrdefault MT_COLOR_HDEFAULT
index_collapsed MT_COLOR_INDEX_COLLAPSED
index_date MT_COLOR_INDEX_DATE
index_label MT_COLOR_INDEX_LABEL
index_number MT_COLOR_INDEX_NUMBER
index_size MT_COLOR_INDEX_SIZE
index_tags MT_COLOR_INDEX_TAGS
indicator MT_COLOR_INDICATOR
markers MT_COLOR_MARKERS
message MT_COLOR_MESSAGE
normal MT_COLOR_NORMAL
progress MT_COLOR_PROGRESS
prompt MT_COLOR_PROMPT
quoted MT_COLOR_QUOTED
search MT_COLOR_SEARCH
sidebar_divider MT_COLOR_DIVIDER
sidebar_flagged MT_COLOR_FLAGGED
sidebar_highlight MT_COLOR_HIGHLIGHT
sidebar_indicator MT_COLOR_SB_INDICATOR
sidebar_new MT_COLOR_NEW
sidebar_ordinary MT_COLOR_ORDINARY
sidebar_spoolfile MT_COLOR_SB_SPOOLFILE
signature MT_COLOR_SIGNATURE
tilde MT_COLOR_TILDE
tree MT_COLOR_TREE
underline MT_COLOR_UNDERLINE
Compose colours:
header MT_COLOR_COMPOSE_HEADER
security_encrypt MT_COLOR_COMPOSE_SECURITY_ENCRYPT
security_sign MT_COLOR_COMPOSE_SECURITY_SIGN
security_both MT_COLOR_COMPOSE_SECURITY_BOTH
security_none MT_COLOR_COMPOSE_SECURITY_NONE
Colours:
black blue brown cyan default green lightgray magenta red white yellow
plus prefix: bright
color{0..255}
Attributes:
bold NONE normal reverse standout underline
Missing attrs:
faint italic conceal strikethrough uri
blink overline doubleunderline curlyunderline
underline == underline1
doubleunderline == underline2
curlyunderline == underlinec ?
Proposed Syntax:
Simple objects:
SIMPLE_COLOUR=[black|blue|...] -- store as ANSI value 0-7 (+bright)
PALETTE_COLOUR=color{0..255} -- store as palette value
HEX3=#[0-9a-fA-F]{3} -- convert to RRGGBB
HEX6=#[0-9a-fA-F]{6} -- store as RRGGBB
RGB_COLOUR=[HEX3|HEX6]
COLOUR=[SIMPLE_COLOUR|PALETTE_COLOUR|RGB_COLOUR]
ATTR=[underline|bold|...]
ATTR_LIST=ATTR{,ATTR}
highlight OBJECT [fg=COLOUR] [bg=COLOUR] [sp=COLOUR] [attr=ATTR_LIST]
Lists:
highlight OBJECT regex=REGEX [fg=COLOUR] [bg=COLOUR] [sp=COLOUR] [attr=ATTR_LIST]
Or in combination
highlight OBJECT [regex=REGEX] [fg=SIMPLECOLOUR] [bg=SIMPLECOLOUR] [sp=SIMPLECOLOUR] [palfg=PALETTE_COLOUR] [palbg=PALETTE_COLOUR] [rgbfg=RGB_COLOUR] [rgbbg=RGB_COLOUR] [attr=ATTR_LIST]
which would allow one colourscheme for all possibilities
would need to store all three colour sets for every object
Colour sequences
38 Set foreground
ansi 3n
palette 38;5;n
rgb 38;2;r;g;b
48 Set background
ansi 4n
palette 48;5;n
rgb 48;2;r;g;b
58 Set special colour
rgb 58:2::r:g:b
Other misc sequences
set terminal title
set terminal icon
highlight uri
bracketed paste
curses will cheat / use shortcuts to reduce the number of characters written to screen
moving the cursor down a few lines, curses will emit CR's
moving the cursor right a few places, curses will emit spaces/tabs
tabs don't draw the colour (the terminal must be moving the cursor directly)
emitting spaces will draw the colour
setcolor, print, move
setcolor is persistent, even after a move
it applies colour
unlike ansi printf which applies colour to one location
when redoing colour/attrs, consider a new file format
for just them -- colour-scheme files
see mc or vim format
unify colours and attrs, e.g. underline, reverse
new mutt colours
none or inherit
don't set this component
fake/alternate curses -> true colour => separate fg, bg, term attrs like vim
does 'colorscheme' command need anything else besides 'color'
e.g. set sidebar_width, layout (future), etc
if so, need to allow more commands / config on "colorscheme X"
repo for colour schemes
min requirements?
light/dark versions?
cf vim set background=light
installed scheme directory
'colorscheme' command to activate
colorscheme name -- for standard install path
colorscheme [next|prev] -- iterate through list?
colorscheme /path -- path to colour scheme file
command limited to color commands
prevent too-long regexes causing 100% cpu
- color body magenta default "(ftp|http|https)://[^ ]+"
+ color body magenta default "(ftp|http|https)://[^ ]{,1024}"
also
- color body magenta default [-a-z_0-9.\+]+@[-a-z_0-9.]+
+ color body magenta default [-a-z_0-9.\+]{,128}@[-a-z_0-9.]{,128}
restricted "source" command - after reading/applying colours
have a "keep these colours" question
default to "No", with a *timeout*
use the configured error/warning/message colours for the stderr logging
introduce warning colour/color
cyan - message
yellow - warning
red - error
use for setting config
add colour to the browser
htop colour palette only works well because there are
few object to colour
colour manager, see htop
index-color separate colours for "mylocal" and "@domain.com"
have a list of "known" domains that are dimmed?
colour-coding good-sig vs bad-sig
tricky for mime attached sigs
index-color
patterns on date
allow unescaped ANSI sequences?
add offset based pattern, e.g.
color red default cols:14-20 [mutt pattern]
'uncolor status' doesn't work
:color
list configured colours
XXX (in colour/attr) name-of-object [pattern]
:color all
list ALL colours include unused
excluding patterns
:color -v
list colours as config?
mixed with XXX... NO
hard to cut'n'paste
screen: SET_COLOR
file: magic sequence
config: "red", "color123", "#RRGGBB", attrs
need option to decide which to use
means one theme file can contain both old and new colours
magic file sequence => max of 256 different colours in use at once
magic could interfere with UTF-8 sequences. NO
all low nums (<32) should be fine
keep array of used colours, limit to 256
lolcat https://github.com/neomutt/neomutt-old
test-ansi https://github.com/neomutt/test-ansi
test-render https://github.com/neomutt/test-render