#coding:utf-8
#pip install manim
#ffmpeg官网 http://ffmpeg.org/
from manim import *
class Draw(Scene):
def construct(self):
text1 = Text(
'Hello World',
t2c={'[:1]': '#3174f0', '[1:2]': '#e53125',
'[2:3]': '#fbb003', '[3:4]': '#3174f4',
'[4:5]': '#269a43', '[5:6]': '#e53125',
'[6:7]': '#3174f3', '[7:8]': '#e53125',
'[8:9]': '#fbb003', '[9:]': '#317460'}, font_size=60)
self.play(Create(text1))
self.play(text1.animate.scale(2))
self.wait()
# manim -pql manim_text.py Draw
