Skip to content

Text color attribute ignored on constructions #4817

Description

@dave-br

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions