Skip to content

Commit 917fbb0

Browse files
Add colors
1 parent 9a1ab4b commit 917fbb0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docs/source/contributing/docs/types.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ In order to provide the best user experience,
55
it's important that typehints are chosen correctly.
66
With the large variety of types provided by Manim, choosing
77
which one to use can be difficult. This guide aims to
8-
aid you in the process.
8+
aid you in the process of choosing the right type for the scenario.
99

1010

1111
The first step is figuring out which category your typehint fits into.
@@ -77,6 +77,18 @@ some form of ``Vector``.
7777

7878
Colors
7979
------
80+
The interface manim provides for working with colors is :class:`.ManimColor`.
81+
The main color types Manim supports are RGB, RGBA, and HSV. You will want
82+
to typehint a function depending on which type it uses. If any color will work,
83+
you will need something like:
84+
85+
.. code-block:: python
86+
87+
if TYPE_CHECKING:
88+
from manim.utils.color import ParsableManimColor
89+
90+
# typehint stuff with ParsableManimColor
91+
8092
8193
8294
Béziers

0 commit comments

Comments
 (0)