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

Feat: dvipsnames and svgnames color palettes #3913

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

christopher-hampson
Copy link
Contributor

Overview: What does this pull request change?

  • Adds color palettes for DVIPSNAMES and SVGNAMES for colors commonly used in LaTeX via the xcolor package.
  • Additional color palettes are accessed in the same way as current palettes/standards already implemented. For example:
    >>> from manim import DVIPSNAMES
    >>> DVIPSNAMES.DARKORCHID
    ManimColor("#A4538A")
    >>> from manim import SVGNAMES
    >>> SVGNAMES.LIGHTCORAL
    ManimColor("##EF7F7F")

Motivation and Explanation: Why and how do your changes improve the library?

  • Provides access to colors that users may be familiar with from typsetting documents/slides in LaTeX, without users needing to lookup and define these themselves.

Links to added or changed documentation pages

Further Information and Comments

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me! Some other stuff:

Do you mind updating this part of the docs?
https://manimce--3913.org.readthedocs.build/en/3913/reference/manim.utils.color.html
image

manim/utils/color/DVIPSNAMES.py Outdated Show resolved Hide resolved
manim/utils/color/SVGNAMES.py Outdated Show resolved Hide resolved
@JasonGrace2282 JasonGrace2282 added the enhancement Additions and improvements in general label Sep 2, 2024
Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Additions and improvements in general
Projects
Status: 👍 To be merged
Development

Successfully merging this pull request may close these issues.

3 participants