ManimCommunity / ManimCommunity/manim
Default fill_opacity to 1 when fill_color is set
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Enhancement proposal
Currently fill_opacity for `VMobject` defaults to 0 which makes sense, but it doesn't make sense for it to remain 0 when the user sets the fill, as fill then doesn't really have any effect:
```py
class Example(Scene):
def construct(self):
rect = Rectangle(fill_color=GREEN)
self.add(rect)
```

I propose that when fill is set opacity should then default to 1 as in the absence of fill_opacity passed by the user it is most likely what they would expect to happen.
## Additional comments
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how VMobject handles fill_color and fill_opacity during construction, using the Rectangle example in the issue as the expected entry point. The change is done when setting fill_color without an explicit fill_opacity produces a visible fill with opacity 1, while an explicitly supplied opacity remains respected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100