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
)
| 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 | """ |