MCPcopy
hub / github.com/ManimCommunity/manim / set_color

Method set_color

manim/mobject/mobject.py:2004–2017  ·  view source on GitHub ↗

Condition is function which takes in one arguments, (x, y, z). Here it just recurses to submobjects, but in subclasses this should be further implemented based on the the inner workings of color

(
        self, color: ParsableManimColor = PURE_YELLOW, family: bool = True
    )

Source from the content-addressed store, hash-verified

2002 # Color functions
2003
2004 def set_color(
2005 self, color: ParsableManimColor = PURE_YELLOW, family: bool = True
2006 ) -> Self:
2007 """Condition is function which takes in one arguments, (x, y, z).
2008 Here it just recurses to submobjects, but in subclasses this
2009 should be further implemented based on the the inner workings
2010 of color
2011 """
2012 if family:
2013 for submob in self.submobjects:
2014 submob.set_color(color, family=family)
2015
2016 self.color = ManimColor.parse(color)
2017 return self
2018
2019 def set_color_by_gradient(self, *colors: ParsableManimColor) -> Self:
2020 """

Callers 15

to_original_colorMethod · 0.95
fade_toMethod · 0.95
match_colorMethod · 0.95
constructMethod · 0.45
test_GradientFunction · 0.45
test_GradientRotationFunction · 0.45
test_CircleFunction · 0.45
test_becomeFunction · 0.45
apply_functionFunction · 0.45
constructMethod · 0.45

Calls 1

parseMethod · 0.45

Tested by 6

test_GradientFunction · 0.36
test_GradientRotationFunction · 0.36
test_CircleFunction · 0.36
test_becomeFunction · 0.36
apply_functionFunction · 0.36