ManimCommunity / ManimCommunity/manim
Text color attribute ignored on constructions
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of bug / unexpected behavior
Text("test", color=WHITE) does not result in a Text object with color WHITE
## Expected behavior
Text("test", color=WHITE) should result in a Text object with color WHITE
## How to reproduce the issue
Code for reproducing the problem
```py
text_obj = Text("test", color=WHITE)
print(text_obj.text + " " + str(text_obj.get_color()))
text_obj.set_color(WHITE)
print(text_obj.text + " " + str(text_obj.get_color()))
```
EXPECTED OUTPUT:
test #FFFFFF
test #FFFFFF
ACTUAL OUTPUT:
test #000000
test #FFFFFF
## System specifications
System Details
- OS Windows 10 19045
- RAM: 16 GB
- Python 3.14.6
- Manim Community v0.20.1
- Installed modules (provide output from `pip list`):
```
Package Version
------------------------------ ---------
alabaster 1.0.0
attrs 23.2.0
babel 2.16.0
certifi 2024.8.30
chardet 5.2.0
charset-normalizer 3.4.0
colorama 0.4.6
distlib 0.3.8
docutils 0.20.1
idna 3.8
imagesize 1.4.1
Jinja2 3.1.5
MarkupSafe 2.1.5
meson 1.6.1
packaging 24.2
pip 24.1.2
Pygments 2.18.0
pyparsing 3.1.2
pytz 2024.2
requests 2.32.3
setuptools 75.6.0
six 1.16.0
snowballstemmer 2.2.0
Sphinx 8.1.3
sphinx_rtd_theme 3.0.1
sphinxcontrib-applehelp 2.0.0
sphinxcontrib-devhelp 2.0.0
sphinxcontrib-htmlhelp 2.1.0
sphinxcontrib-jquery 4.1
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 2.0.0
sphinxcontrib-serializinghtml 2.0.0
sphinxcontrib-svg2pdfconverter 1.2.3
urllib3 1.26.20
```
LaTeX details
(no LaTeX installed)
## Additional comments
Contributor guide
Research direction
Start with the Text constructor and the get_color/set_color behavior shown in the reproduction code. Trace how the color argument is stored during Text("test", color=WHITE), then run the example or relevant tests. Done means construction reports #FFFFFF, matching set_color(WHITE) afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100