def construct(self):
    square = Square(side_length=5, fill_color=YELLOW, fill_opacity=1)
    label = TextMobject('Text at an angle')
    label.bg = BackgroundRectangle(label, fill_opacity=1)
    label_group = VGroup(label.bg, label)
    label_group.rotate((TAU / 8))
    label2 = TextMobject('Boxed text', color=BLACK)
    label2.bg = SurroundingRectangle(label2, color=BLUE, fill_color=RED, fill_opacity=0.5)
    label2_group = VGroup(label2, label2.bg)
    label2_group.next_to(label_group, DOWN)
    label3 = TextMobject('Rainbow')
    label3.scale(2)
    label3.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
    label3.to_edge(DOWN)
    self.add(square)
    self.play(FadeIn(label_group))
    self.play(FadeIn(label2_group))
    self.play(FadeIn(label3))
def construct(self):
    square = Square(side_length=5, fill_color=YELLOW, fill_opacity=1)
    label = TextMobject('Text at an angle')
    label.bg = BackgroundRectangle(label, fill_opacity=1)
    label_group = VGroup(label.bg, label)
    label_group.rotate((TAU / 8))
    label2 = TextMobject('Boxed text', color=BLACK)
    label2.bg = SurroundingRectangle(label2, color=BLUE, fill_color=RED, fill_opacity=0.5)
    label2_group = VGroup(label2, label2.bg)
    label2_group.next_to(label_group, DOWN)
    label3 = TextMobject('Rainbow')
    label3.scale(2)
    label3.set_color_by_gradient(RED, ORANGE, YELLOW, GREEN, BLUE, PURPLE)
    label3.to_edge(DOWN)
    self.add(square)
    self.play(FadeIn(label_group))
    self.play(FadeIn(label2_group))
    self.play(FadeIn(label3))