Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep it concise but clear. Example: "set_color_by_gradient not working as expected in ManimGL" #2228

Open
mathsvisualization opened this issue Oct 23, 2024 · 1 comment
Labels

Comments

@mathsvisualization
Copy link

mathsvisualization commented Oct 23, 2024

Describe the bug

When I use the set_color_by_gradient function in ManimGL, the object does not get the expected gradient coloring. Instead, it either shows a single color or doesn't change color at all.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Text or VMobject.
  2. Apply set_color_by_gradient with two or more colors.
  3. Run the scene and observe the output.

Code:

from manim_imports_ext import *

class Factorial(InteractiveScene):
    def construct(self):
        self.embed()
        # Introduction  
        definition = Tex(
            R"\mathbb{R} \text{ecursive}\ \mathbb{D} \text{efinition of } \mathbb{F} \text{actorial}")
        definition.set_width(FRAME_WIDTH - 1)
        definition.set_color_by_gradient(BLUE_C, YELLOW)
        definition.move_to([0, 2.1, 0])
        self.add(definition)

### Environment
1. ManimGL Version: v1.7.0
2. Python Version: 3.12.3
3. OS: Ubuntu on Termux (Android)
![VideoCapture_20241023-143559](https://github.com/user-attachments/assets/4c858a6d-14d2-4594-b557-1e2e4e2a7ff0)
@3b1b 
@Varniex
Copy link
Contributor

Varniex commented Oct 24, 2024

Hi, I can't reproduce the bug. I am getting the desired gradient effect. Make sure you have the updated packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants