forked from zixijian/tt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
colorpad.tt
51 lines (47 loc) · 1.15 KB
/
colorpad.tt
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
#nop 调色板;
#class colorpad open;
#alias {colorpad} {
#echo @color_radom{==============调色板==============};
#echo @color_radom{『大慈大悲入凡尘,普度苍生怜世人』};
#var color_dic {A;B;C;D;E;F};
#var color_bg {};
#var color_str {};
#math i 0;
#foreach {$color_dic} c1 {
#foreach {$color_dic} c2 {
#foreach {$color_dic} c3 {
#var color_bg {$color_bg<$c1$c2$c3>\<$c1$c2$c3\> };
#var color_str {$color_str<@lower{$c1$c2$c3}>\<@lower{$c1$c2$c3}\> };
#math i {$i+1};
#if {$i==6} {
#math i 0;
#echo {$color_bg <000> $color_str};
#var color_bg {};
#var color_str {};
};
};
};
};
};
#nop 随机上色;
#function color_radom {
#list color_dic2 create {a;b;c;d;e;f};
#local color_radom {};
#parse %1 char {
#local ccolor {<$color_dic2[+1d6]$color_dic2[+1d6]$color_dic2[+1d6]>};
#local color_radom {$color_radom$ccolor$char};
};
#return $color_radom;
};
#function color_r2 {
#local color_r2 {};
#parse %1 char {
#math a {1d9-1};
#math b {1d9};
#math c {1d9};
#local ccolor {<$a$b$c>};
#local color_r2 {$color_r2$ccolor$char};
};
#return $color_r2;
}
#class colorpad close;