3b1b / 3b1b/manim

VMobject cannot achieve gradient effect

Open
#1,997 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
93.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

### Describe the bug
Before, the following code can achieve the gradient effect:

**Code**:
```
class Bg(Scene):
def construct(self):
bg = FullScreenRectangle(fill_color=["#032348","#46246d","#31580a","#852211",])
self.add(bg)
```
**Output:**
![Graph1](https://user-images.githubusercontent.com/21994605/220156263-2d833d4c-5f6b-4119-a2e0-2b8d5064204a.png)

**Wrong display or Error traceback**:
But now the output is
![Bg](https://user-images.githubusercontent.com/21994605/220156473-c7de4219-d17e-4818-891a-99fef2252c80.png)

### Additional context
Is there a way to change it to the previous effect, or is there a new way to achieve it?

Contributor guide

No contributing guide indexed for this repository

Research direction

Look at the VMobject and FullScreenRectangle classes in manim, particularly the fill_color handling and gradient generation. Check recent changes to color interpolation or shader code. Run the provided code to reproduce the issue, then compare with older versions to understand what changed. The goal is to restore the gradient effect when a list of colors is passed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.