forked from emrerdem1/Magnum-s-Aegisub-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolor_fade_v3.ass
50 lines (48 loc) · 7.72 KB
/
color_fade_v3.ass
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
[Script Info]
; Script generated by Aegisub 3.2.2
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 1280
PlayResY: 720
ScaledBorderAndShadow: yes
Video Aspect Ratio: 0
Video Zoom: 6
YCbCr Matrix: TV.601
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: cfade,Cambria,40,&H00FFFFFF,&H000000FF,&H00000000,&H00FFFFFF,-1,0,0,0,100,100,0,0,1,2,0,8,10,10,30,1
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Comment: 0,0:00:00.00,0:00:00.00,cfade,by Magnum357,0,0,0,code line all,local max_char, cc, cn, cnn = _G.unicode.len(orgline.text_stripped:gsub(" ","")), {}, {}, {}; for i = 1, 50 do _G.table.insert(cc,0); _G.table.insert(cn,1); _G.table.insert(cnn,0); end; local function calc(mode,numb1,numb2,i,interval) local dec = ""; if numb2 >= numb1 then if mode == "perfect" then dec = ((numb2 - numb1) / interval) / interval; elseif mode == "missing" then dec = 0; end; return math.floor(numb1 + ((numb2 - numb1) / interval * (i - 1) + dec * i)); else if mode == "perfect" then dec = ((numb1 - numb2) / interval) / interval; elseif mode == "missing" then dec = 0; end; return math.ceil(numb1 - ((numb1 - numb2) / interval * (i - 1) + dec * i)); end; end; local function var(s) s = s..","; local n, vars = 0, {}; for v in s:gmatch("(.-),") do n = n + 1; vars[n] = v; end; return n - 1, vars end; function cfade(id,colors) if syl.text ~= "" then local calc_mode = "missing" local r, g, b = {}, {}, {}; cnnn = {}; cc[id] = cc[id] + 1; cnn[id] = cnn[id] + 1; local c, color = var(colors); for k = 1, c do _G.table.insert(cnnn,(max_char / c) * k); end; local i, it, int = 0, cnnn[1], {}; for j = 1, max_char do i = i + 1; if math.floor(it) == j then it = it + cnnn[1]; _G.table.insert(int,i); i = 0; end; end; if cn[id] > c then cn[id] = 1; end; if cc[id] > cnnn[cn[id]] then cn[id] = cn[id] + 1; cnn[id] = 1; end; for y = 1, c + 1 do r[y], g[y], b[y] = _G.extract_color(color[y]); end; if r[cn[id] + 2] == nil then calc_mode = "perfect" end; return _G.ass_color(calc(calc_mode,r[cn[id]],r[cn[id] + 1],cnn[id],int[cn[id]]),calc(calc_mode,g[cn[id]],g[cn[id] + 1],cnn[id],int[cn[id]]),calc(calc_mode,b[cn[id]],b[cn[id] + 1],cnn[id],int[cn[id]])); else return "" end; end;
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,code line,pos_x = 70; pos_y = 88; pos_shape_y = 30
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template char noblank,{\pos($scenter,!pos_y!)\an5}{\c!cfade(1,"&H00FF00&,&H6B6CCB&,&HFF003F&,&HFFFFFF&,&H000000&,&HFFF300&")!}
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template char noblank,{\pos($scenter,!pos_y*2!)\an5}{\c!cfade(5,"&H00FFBB&,&H0000FF&")!}
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template char noblank,{\pos($scenter,!pos_y*3!)\an5}{\c!cfade(8,"&HFF2200&,&H4DFF00&,&H0000FF&")!}
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template char noblank,{\pos($scenter,!pos_y*4!)\an5}{\c!cfade(10,"&HFFFF00&,&H41C5E2&,&HEF00FF&,&H00EAFF&")!}
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template char noblank,{\pos($scenter,!pos_y*5!)\an5}{\c!cfade(12,"&H008AFF&,&HFFFFFF&,&HB8FF00&")!}
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template char noblank,{\pos($scenter,!pos_y*6!)\an5}{\c!cfade(13,"&H0000FF&,&H000000&")!}
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template char noblank,{\pos($scenter,!pos_y*7!)\an5}{\c!cfade(15,"&H0000FF&,&H00D8FF&")!}
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template line noblank notext,{\bord0\shad0\fsc50\pos($lcenter,!pos_y+pos_shape_y!)}{\c&H00FF00&\an5}!(syl.i == 1) and "&H00FF00&" or ""!{\c&H6B6CCB&\an5}!(syl.i == 1) and " &H6B6CCB&" or ""!{\c&HFF003F&\an5}!(syl.i == 1) and " &HFF003F&" or ""!{\c&HFFFFFF&\an5}!(syl.i == 1) and " &HFFFFFF&" or ""!{\c&H000000&\an5}!(syl.i == 1) and " &H000000&" or ""!{\c&HFFF300&\an5}!(syl.i == 1) and " &HFFF300&" or ""!
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template line noblank notext,{\bord0\shad0\fsc50\pos($lcenter,!pos_y*2+pos_shape_y!)}{\c&H00FFBB&\an5}!(syl.i == 1) and "&H00FFBB&" or ""!{\c&H0000FF&\an5}!(syl.i == 1) and " &H0000FF&" or ""!
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template line noblank notext,{\bord0\shad0\fsc50\pos($lcenter,!pos_y*3+pos_shape_y!)}{\c&HFF2200&\an5}!(syl.i == 1) and "&HFF2200&" or ""!{\c&H4DFF00&\an5}!(syl.i == 1) and " &H4DFF00&" or ""!{\c&H0000FF&\an5}!(syl.i == 1) and " &H0000FF&" or ""!
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template line noblank notext,{\bord0\shad0\fsc50\pos($lcenter,!pos_y*4+pos_shape_y!)}{\c&HFFFF00&\an5}!(syl.i == 1) and "&HFFFF00&" or ""!{\c&H41C5E2&\an5}!(syl.i == 1) and " &H41C5E2&" or ""!{\c&HEF00FF&\an5}!(syl.i == 1) and " &HEF00FF&" or ""!{\c&H00EAFF&\an5}!(syl.i == 1) and " &H00EAFF&" or ""!
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template line noblank notext,{\bord0\shad0\fsc50\pos($lcenter,!pos_y*5+pos_shape_y!)}{\c&H008AFF&\an5}!(syl.i == 1) and "&H008AFF&" or ""!{\c&HFFFFFF&\an5}!(syl.i == 1) and " &HFFFFFF&" or ""!{\c&HB8FF00&\an5}!(syl.i == 1) and " &HB8FF00&" or ""!
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template line noblank notext,{\bord0\shad0\fsc50\pos($lcenter,!pos_y*6+pos_shape_y!)}{\c&H0000FF&\an5}!(syl.i == 1) and "&H0000FF&" or ""!{\c&H000000&\an5}!(syl.i == 1) and " &H000000&" or ""!
Comment: 0,0:00:00.00,0:00:00.00,cfade,,0,0,0,template line noblank notext,{\bord0\shad0\fsc50\pos($lcenter,!pos_y*7+pos_shape_y!)}{\c&H0000FF&\an5}!(syl.i == 1) and "&H0000FF&" or ""!{\c&H00D8FF&\an5}!(syl.i == 1) and " &H00D8FF&" or ""!
Dialogue: 0,0:01:41.16,0:01:43.61,cfade,,0,0,0,,{\k18}{\k38}Fight! {\k22}Bu{\k14}tsu{\k31}ka{\k31}tte {\k25}ha{\k17}mu{\k16}ka{\k14}tte
Dialogue: 0,0:01:43.61,0:01:46.96,cfade,,0,0,0,,{\k26}So{\k17}re {\k18}ga {\k15}bo{\k31}ku {\k16}ta{\k35}chi {\k32}no {\k45}Hard {\k37}Knock {\k31}Days
Dialogue: 0,0:01:46.96,0:01:51.63,cfade,,0,0,0,,{\k17}He{\k17}i{\k14}bo{\k20}n {\k30}na {\k16}ma{\k17}i{\k18}ni{\k16}chi {\k31}ja {\k18}ka{\k17}wa{\k19}ki {\k21}i{\k36}ya{\k23}se{\k114}nai
Dialogue: 0,0:01:51.63,0:01:54.13,cfade,,0,0,0,,{\k24}Here {\k15}We {\k16}Go! {\k18}Is{\k17}tu{\k31}da{\k29}tte {\k21}ni{\k17}ge{\k13}na{\k18}i{\k31}de
Dialogue: 0,0:01:54.13,0:01:58.20,cfade,,0,0,0,,{\k19}Ka{\k16}ze{\k18}a{\k16}ta{\k26}ri {\k22}tsu{\k29}yo{\k34}ku {\k30}i{\k35}ki{\k32}te{\k49}yu{\k47}kou
Dialogue: 0,0:01:58.20,0:02:00.66,cfade,,0,0,0,,{\k19}Go{\k18}o{\k14}ru {\k23}ma{\k25}da {\k33}to{\k34}o{\k80}ku
Dialogue: 0,0:02:00.66,0:02:02.27,cfade,,0,0,0,,{\k18}{\k16}Su{\k14}su{\k19}mu{\k23}be{\k25}ki {\k27}mi{\k25}chi
Dialogue: 0,0:02:02.27,0:02:04.46,cfade,,0,0,0,,{\k34}Fight! {\k21}Ke{\k13}chi{\k15}ra{\k17}shi{\k28}te {\k17}tsu{\k17}yo{\k35}ga{\k22}tte
Dialogue: 0,0:02:04.46,0:02:07.31,cfade,,0,0,0,,{\k28}So{\k17}re {\k18}ga {\k15}bo{\k30}ku {\k17}ta{\k35}chi {\k32}no {\k46}Hard {\k25}Knock {\k22}Days
Dialogue: 0,0:02:07.31,0:02:12.32,cfade,,0,0,0,,{\k55}{\k26}Bu{\k16}na{\k21}n {\k30}na {\k21}se{\k16}n{\k14}ta{\k18}ku? {\k15}So{\k12}n{\k22}na{\k17}no {\k17}a{\k16}ru {\k48}wa{\k18}ke {\k125}nai
Dialogue: 0,0:02:12.32,0:02:14.65,cfade,,0,0,0,,{\k20}{\k23}Here {\k15}We {\k15}Go! {\k16}I{\k18}tsu{\k30}da{\k34}tte {\k19}sa{\k16}i{\k7}ko{\k7}u {\k13}de
Dialogue: 0,0:02:14.65,0:02:18.03,cfade,,0,0,0,,{\k38}{\k15}A{\k15}to{\k19}sa{\k17}ki {\k15}na{\k16}n{\k16}te {\k16}ka{\k16}n{\k16}ga{\k14}e{\k32}zu {\k34}ni {\k33}yu{\k13}ko{\k13}u
Dialogue: 0,0:02:18.03,0:02:21.39,cfade,,0,0,0,,{\k100}{\k23}Ne{\k18}ga{\k15}i {\k21}wo {\k26}ta{\k32}ba{\k30}ne{\k71}te
Dialogue: 0,0:02:21.39,0:02:26.20,cfade,,0,0,0,,{\k25}{\k20}Su{\k20}su{\k16}mu{\k21}be{\k28}ki {\k33}Hard {\k32}Knock {\k293}Days
Dialogue: 0,0:02:30.42,0:02:36.30,cfade,,0,0,0,,{\k50}{\k36}Hi{\k28}ka{\k24}ri {\k28}no {\k21}sa{\k15}ki {\k73}Make {\k77}My {\k238}Day