Open
Description
At first, I wanted to draw a line, but I found the color was inaccurate. Later, I drew several lines in different directions, but why does the color still look wrong? Line1 has no color gradient, Line2 and Line3 are fine, but the color of Line4 is reversed.
class ColorTest(Scene):
def construct(self):
Line1 = Line(np.array([-1, 0, 0]), np.array([0, 1, 0])).set_color(color=["#7301FF", "#EDCD00"])
Line2 = Line(np.array([-1, 0, 0]), np.array([1, 0, 0])).set_color(color=["#7301FF", "#EDCD00"])
Line3 = Line(np.array([-1, 0, 0]), np.array([0, -1, 0])).set_color(color=["#7301FF", "#EDCD00"])
Line4 = Line(np.array([-1, 0, 0]), np.array([-1, 1, 0])).set_color(color=["#7301FF", "#EDCD00"])
self.play(Create(Line1), Create(Line2), Create(Line3), Create(Line4))
self.wait(2)
My idea was to draw a line with the starting point at (-1, 0) and the endpoint at (0, 1), with the color gradient from #EDCD00 to #7301FF. After looking into the issue with set_color_by_gradient(), I found that someone solved it using set_color(), but the color start and end points were reversed.
What should I do?
Manim Community v0.19.0
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🆕 New