-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathterm_256colors.sql
More file actions
31 lines (28 loc) · 1.47 KB
/
term_256colors.sql
File metadata and controls
31 lines (28 loc) · 1.47 KB
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
/* Show all the 256 colors (if the terminal have this capability) */
col color for a200
prompt
prompt Background colors. USAGE: chr(27) || '[48;5;' || number
define x=48
select
'id=' || to_char(4 * (level-1) + 1,'999') ||
chr(27) || '[&x.;5;' || ( 4 * (level-1) + 1 ) || 'm' || ' COLOR ' || chr(27) || '[0m' || ' ' ||
'id=' || to_char(4 * (level-1) + 2,'999') ||
chr(27) || '[&x.;5;' || ( 4 * (level-1) + 2 ) || 'm' || ' COLOR ' || chr(27) || '[0m' || ' ' ||
'id=' || to_char(4 * (level-1) + 3,'999') ||
chr(27) || '[&x.;5;' || ( 4 * (level-1) + 3 ) || 'm' || ' COLOR ' || chr(27) || '[0m' || ' ' ||
'id=' || to_char(4 * (level-1) + 4,'999') ||
chr(27) || '[&x.;5;' || ( 4 * (level-1) + 4 ) || 'm' || ' COLOR ' || chr(27) || '[0m' color
from dual connect by level <= 256/4;
prompt
prompt Foreground colors USAGE: chr(27) || '[38;5;' || number
define x=38
select
'id=' || to_char(4 * (level-1) + 1,'999') ||
chr(27) || '[&x.;5;' || ( 4 * (level-1) + 1 ) || 'm' || ' COLOR ' || chr(27) || '[0m' || ' ' ||
'id=' || to_char(4 * (level-1) + 2,'999') ||
chr(27) || '[&x.;5;' || ( 4 * (level-1) + 2 ) || 'm' || ' COLOR ' || chr(27) || '[0m' || ' ' ||
'id=' || to_char(4 * (level-1) + 3,'999') ||
chr(27) || '[&x.;5;' || ( 4 * (level-1) + 3 ) || 'm' || ' COLOR ' || chr(27) || '[0m' || ' ' ||
'id=' || to_char(4 * (level-1) + 4,'999') ||
chr(27) || '[&x.;5;' || ( 4 * (level-1) + 4 ) || 'm' || ' COLOR ' || chr(27) || '[0m' color
from dual connect by level <= 256/4;