A community-maintained Python framework for creating mathematical animations.
Added clipping to get_stroke_rgb and get_fill_rgb for cases when interpolation of colors accidentally goes outisde this range
Grant Sandersona58582915e5f
diff --git a/mobject/vectorized_mobject.py b/mobject/vectorized_mobject.pyindex e732cc5b5..a3ac3372f 100644--- a/mobject/vectorized_mobject.py+++ b/mobject/vectorized_mobject.py@@ -122,7 +122,7 @@ class VMobject(Mobject):return selfdef get_fill_rgb(self):- return self.fill_rgb+ return np.clip(self.fill_rgb, 0, 1)def get_fill_color(self):try:@@ -135,7 +135,7 @@ class VMobject(Mobject):return np.clip(self.fill_opacity, 0, 1)def get_stroke_rgb(self):- return self.stroke_rgb+ return np.clip(self.stroke_rgb, 0, 1)def get_stroke_color(self):try: