Skip to content

Delegate color handling in Code to pygments and add instructions for creating custom styles - #4816

Merged
behackl merged 13 commits into
ManimCommunity:mainfrom
Helbronner:fix-code-background-color
Aug 7, 2026
Merged

Delegate color handling in Code to pygments and add instructions for creating custom styles#4816
behackl merged 13 commits into
ManimCommunity:mainfrom
Helbronner:fix-code-background-color

Conversation

@Helbronner

@Helbronner Helbronner commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Overview: What does this pull request change?

This pull request fixes an issue (#4811 ) where custom formatter_style (especially in a light theme like xcode) was previously overridden by the hardcoded dark ManimColor("#222") default fill_color. It also updates the line number color logic to dynamically respect the active Pygments style.

Fixes #4811

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

Previously, specifying a light formatter_style (e.g., xcode) resulted in an incorrect dark container background because of the hardcoded ManimColor("#222") default.

This pull request resolves the issue by dynamically extracting the native background_color from the active Pygments style. Additionally, line number colors are now dynamically fetched from the style context (falling back to GRAY if unspecified) to prevent invisible white text on light backgrounds.

Q&A

Q: Why is the fill_color attribute preserved instead of deleted?
A: To maintain backward compatibility. While deprecating fill_color aligns with the WYSIWYG principle (since Pygments styles should dictate the theme), removing it immediately would break existing user configurations. It is recommended to deprecate this attribute now and remove it during a future major refactor of the Code class.

Links to added or changed documentation pages

Further Information and Comments

Verification

This fix successfully resolves the issue. Below is the demonstration of the expected behavior:

Test.mp4

Test Comparison

Category Style Before After
Light xcode xcode-before xcode-after
Light solarized-light solarized-light-before solarized-light-after
Dark lightbulb lightbulb-before lightbulb-after
Dark dracula dracula-before dracula-after

Test Script

Code for verifying the fix
from typing import Any

from manim import *
from pygments.styles import STYLE_MAP


class Test(Scene):
    def construct(self):

        default_background_config: dict[str, Any] = {
            "buff": 0.3,
            # "fill_color": ManimColor("#222"),  # Here
            "stroke_color": WHITE,
            "corner_radius": 0.2,
            "stroke_width": 1,
            "fill_opacity": 1,
        }

        default_paragraph_config: dict[str, Any] = {
            "font": "Monospace",
            "font_size": 24,
            "line_spacing": 0.5,
            "disable_ligatures": True,
        }

        # file: str = "code_snippets.py"
        code_snippets: str = """from collections.abc import Iterator


# This is an example
class Math:
    @staticmethod
    def fib(n: int) -> Iterator[int]:
        \"""Fibonacci series up to n.\"""
        a, b = 0, 1
        while a < n:
            yield a
            a, b = b, a + b


result = sum(Math.fib(42))
print(f"The answer is {result}")
"""

        for style in list(STYLE_MAP.keys())[:]:
            mark: str = style
            rendered_code = Code(
                # code_file=file,
                code_string=mark + "\n\n" + code_snippets,
                language="python",
                formatter_style=style,  # Here
                tab_width=4,
                add_line_numbers=True,
                line_numbers_from=1,
                background="window",
                background_config=default_background_config,
                paragraph_config=default_paragraph_config,
            )

            self.add(rendered_code)
            self.wait(2)
            self.remove(rendered_code)

Related Resources

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

Thanks for your time and review!

Using a custom `formatter_style` (such as a light theme) was previously overridden by the hardcoded dark `ManimCommunity#222` default `fill_color`. This change dynamically extracts the native `background_color` attribute from the specified Pygments style to ensure the container matches the theme.

Additionally, updated the line number color logic: it now respects the color defined by the active Pygments style, falling back to `GRAY` if unspecified, preventing invisible white text on light backgrounds.

Fixes ManimCommunity#4811
Previously, user-defined background `fill_color` was accidentally overridden by the default fallback color. This fix ensures that the custom value is preserved, passing the related test assertions.

@behackl behackl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for your contribution! I agree that this should be fixed, I've just found a few small details that were not quite right with your proposed solution:

  • base_paragraph_config.update({"color": BLACK}) overrides a user-provided paragraph color and makes unstyled text unreadable with dark themes.
  • the Text tokens in pygments also sometimes define a foreground color, if one is available that should be used (and fall back to BLACK only if that is unset)
  • While we are at it, the line number styling should be decoupled a bit more from the code paragraph config
  • And finally, a few more tests would be nice.

I'll push a reviewer commit addressing these changes in a second -- could you please take a look and let me know whether you are happy and whether your original usecase is still covered as intended? I'm happy to get this merged afterwards.

@behackl behackl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Pushed aa7a1c6, happy with coverage and implementation from my point of view. Let me know what you think!

@Helbronner

Copy link
Copy Markdown
Contributor Author

Thanks for the update, @behackl! I received your changes and am taking a look at commit aa7a1c6 now. I'll get back to you shortly.

background_config_base.update(background_config)
background_config_base.update(background_config or {})
if background_config_base["fill_color"] is None:
background_config_base["fill_color"] = selected_style.background_color

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would it perhaps make sense to use the existing setdefault method here? I.e., replace lines 235-236 with

background_config_base.setdefault("fill_color", selected_style.background_color)

This also removes the need for defining "fill_color": None, in default_background_config.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi, thanks for the feedback! I think we should keep fill_color for now, mainly for backward compatibility. Also, removing it right away would require providing an alternative approach for custom styling, which still needs further discussion. So keeping it feels like a good temporary workaround.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm maybe misunderstanding you here! Are you saying that this replacement would break backward compatibility?

AFAICT, behavior is entirely unchanged by removing "fill_color": None from default_background_config, since background_config_base.setdefault will populate the value with either background_config["fill_color"] or selected_style.background_color depending on whether fill_color is already a key in the background_config_base dict. That is, if the user provides a fill color, we use that, otherwise we use the BG color from selected_style.

Am I misunderstanding my own code, is this actually a completely different thing? 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Haha, my bad! Looks like I misunderstood that part. Thanks for clarifying!

I see what you mean now. In my opinion, it comes down to coding habits — the previous approach was a bit more traditional, whereas your solution is definitely more Pythonic.

# 1. Using if-else (Traditional / Explicit)
if background_config_base["fill_color"] is None:
    background_config_base["fill_color"] = selected_style.background_color

# Or
if "fill_color" not in background_config_base:
    background_config_base["fill_color"] = selected_style.background_color

# 2. Using setdefault (Pythonic / Concise)
background_config_base.setdefault("fill_color", selected_style.background_color)

That said, I personally slightly prefer the former just because I find it a bit more explicit and semantic to read for Python beginners. But I'm completely fine with your version if you prefer!

Thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm fine either way, and this could easily be a PR of its own along with my other comment below. "Proper handling of config dictionaries" or whatever. I'm sure there are other mobject types where this could be applied.

background_config = {}
background_config_base = self.default_background_config.copy()
background_config_base.update(background_config)
background_config_base.update(background_config or {})

@nikolajmunk nikolajmunk Aug 6, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe this breaks some convention I'm unaware of – if so, please disregard!

The current default value of background_config (and paragraph_config for that matter) is

background_config: dict[str, Any] | None = None,

which is why this background_config or {} construct is needed. Could we instead set the default value to

background_config: dict[str, Any] = {},

and instead do one of these for updating the config dict?

background_config_base = self.default_background_config.copy()
background_config_base.update(background_config)

or

background_config_base = self.default_background_config | background_config

edit: I guess one reason to keep them as None is that it explicitly communicates optionality to the user, though you could make that case about other types of default value.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Interesting idea in principle. I think, however, it is better if library code used "conventional" means of manipulating dictionaries; if we start using the same mechanisms as users do we might inadvertently override a decision the user has made already... which we could still check for here of course.

Either way, I think you are right in that handling of configuration dicts is a separate issue to discuss (and I am pretty sure that, especially for more complex mobjects, there is a ton to improve.)

@Helbronner

Helbronner commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

I've checked commit aa7a1c6. The changes look great to me; thanks for helping with this! I agree with these updates.

Summary & Context for Future Reference

1. The default paragraph color

Rather than setting the default paragraph color, you are actually setting the color for characters that Pygments does not explicitly classify.

Since we adopt Pygments, we found that it provides default colors for unrecognized plain text or punctuation. There are two situations: one is None, and the other is a specified color depending on the style config. The specified color situation is straightforward—we just assign the specified color. But for the None situation, what color is suitable? The answer is black. By analyzing the output of Pygments' highlight method, we found that None typically falls back to black in web browser contexts (like Google Chrome). Therefore, we assign black as the default paragraph color (especially for punctuation).

base_paragraph_config.update(paragraph_config or {})
default_text_color = selected_style.style_for_token(TextToken).get("color")
if default_text_color is not None:
    default_text_color = ManimColor(f"#{default_text_color}")
base_paragraph_config.setdefault("color", default_text_color or BLACK)

The code snippet above allocates the default paragraph color. If not set, the default paragraph color is white because Paragraph uses Text to render characters, where the default color is white. White text works fine with dark styles, but is problematic for light styles—especially with a white background like xcode.

In practice, paragraph color settings only affect unrecognized plain text and punctuation (such as commas ,, colons :, parentheses ( ), and square brackets [ ]) when users specify both a light style like xcode and a custom paragraph color using a config like below:

default_paragraph_config: dict[str, Any] = {
    "font": "Monospace",
    "font_size": 24,
    "line_spacing": 0.5,
    "disable_ligatures": True,
    "color": "#03fcfc" # Specified by users
}

It is worth noting that this custom color has no effect in dark styles. This is because all built-in dark styles explicitly set the color for every character, overriding any user-specified paragraph color during the syntax highlighting process.

Related Script
Getting the Default Pygments Color for Unrecognized Characters
from pygments.styles import STYLE_MAP
from pygments.token import Text as TextToken
from pygments.styles import get_style_by_name

for formatter_style in list(STYLE_MAP.keys())[:]:
    # print(formatter_style)
    selected_style = get_style_by_name(formatter_style)
    # print(selected_style)
    default_text_color = selected_style.style_for_token(TextToken).get("color")
    print(f"{formatter_style}: {default_text_color}")
Output
abap: None
algol: None
algol_nu: None
arduino: None
autumn: None
bw: None
borland: None
coffee: ddd0c0
colorful: None
default: None
dracula: f8f8f2
emacs: None
friendly_grayscale: None
friendly: None
fruity: ffffff
github-dark: e6edf3
gruvbox-dark: dddddd
gruvbox-light: None
igor: None
inkpot: cfbfad
lightbulb: d4d2c8
lilypond: None
lovelace: None
manni: None
material: EEFFFF
monokai: f8f8f2
murphy: None
native: d0d0d0
nord-darker: d8dee9
nord: d8dee9
one-dark: ABB2BF
paraiso-dark: e7e9db
paraiso-light: 2f1e2e
pastie: None
perldoc: None
rainbow_dash: 4d4d4d
rrt: dddddd
sas: None
solarized-dark: 839496
solarized-light: 657b83
staroffice: 000080
stata-dark: cccccc
stata-light: 111111
tango: None
trac: None
vim: cccccc
vs: None
xcode: None
zenburn: dcdccc

2. The implementation of line number color

Initially, we noticed that when specifying light styles like xcode, line numbers disappeared. After analysis, we found that it is related to the implementation of the Code class. More specifically, the Code class relies on Paragraph, which in turn relies on Text. The default character color in Text is white, which obviously blends into a white background. As a result, we needed a color that displays well against a light background.

Since we use Pygments, we found that it provides the line_number_color attribute for line numbers, which falls into two cases: inherit or a specific color defined by the style configuration. The specified color scenario is straightforward—we simply assign that color. For the inherit scenario, however, choosing an appropriate fallback is essential.

Under inherit, line numbers default to white due to the hierarchy discussed above. This presents clear drawbacks: white line numbers become invisible on light backgrounds and create uncomfortably high contrast on dark backgrounds. To resolve this, gray ("#888888") is selected as the default—a practice widely adopted by mainstream code editors and popular syntax themes due to its excellent legibility on both light and dark styles.

3. Since it only affects the line number color, why set a default color for the paragraph?

This is because we aimed to follow the original design pattern and keep code changes to a minimum. Additionally, while we identified potential improvements in the Code class—such as supporting text attributes (e.g., bold, italic, underline, and background color) to better align with the Pygments standard—these changes require further discussion within the Manim Community Dev Team. Therefore, we prioritized backward compatibility and minimal code modification for now.

Furthermore, this approach enhances robustness and allows users to define custom styles for characters that Pygments does not recognize.

Please note that the summary above is based on my personal recall and may contain omissions, inaccuracies, or incomplete descriptions. Feel free to point out any errors! The main goal is to serve as a reference for future contributors when modifying or refactoring this code.

Thanks for your time and review!

@nikolajmunk

Copy link
Copy Markdown
Contributor

Regarding line number coloring: ManimColor provides the contrasting method which chooses between a light and a dark color (default white/black) depending on the luminance of the current color. This might be a decent way to choose a nice-looking color for both light and dark backgrounds

@behackl behackl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for pointing out ManimColor.contrasting()! I took another look at the intended semantics of Pygments line_number_color = "inherit":

Rather than choosing a fixed gray or always deriving black/white from the background, I think the cleanest behavior is to inherit the foreground color already resolved for the code paragraph.

  • A user-configured paragraph_config["color"] continues to apply to both code and line numbers.
  • Otherwise, an explicit Pygments line_number_color is used.
  • If Pygments specifies "inherit", line numbers use the style’s general Text foreground color.
  • If that foreground is unspecified, they use the existing black fallback.

I checked the styles bundled with Pygments 2.20.0: 52 use "inherit", and 24 of those do not define a general Text foreground. All 24 are light themes, so the black fallback is appropriate. For example, Vim now inherits #cccccc, while Xcode falls back to black.

ManimColor.contrasting() would guarantee black/white contrast, but it would discard the style’s chosen foreground color when one exists. Inheriting that color seems more faithful to the formatter style.

I also added tests covering explicit paragraph colors, class-default paragraph colors, explicit Pygments line-number colors, inherited foreground colors, and the black fallback.

GH Actions are currently down, but I'll leave this open for others to weigh in anyways -- thanks for all the comments, reviews and work invested here; much appreciated. Thank you!

@Helbronner

Helbronner commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Indeed, in terms of Pygments semantics (inherit), using the style's general Text foreground color is more appropriate when line_number_color = "inherit".

Related Resources

1. Line number color resolution logic
graph TD
  C{Is paragraph color configured?} 
  C -->|Yes| D[Use configured color]
  C -->|No| E{Is line number color `inherit`?}

  E --> |Yes| F{Is `default_text_color` `None`?}
  E --> |No| G[Use line number color specified by style]
  
  F --> |Yes| H[Fall back to BLACK]
  F --> |No| I[Use foreground color specified by style]
Loading
2. Script to inspect line number colors and foreground colors across all Pygments styles
from pygments.styles import get_all_styles, get_style_by_name
from pygments.token import Text as TextToken

for style_name in get_all_styles():
    selected_style = get_style_by_name(style_name)
    default_text_color = selected_style.style_for_token(TextToken).get("color")
    line_number_color = getattr(selected_style, "line_number_color", None)
    print(f"{style_name:<20}: {line_number_color:<20} {default_text_color}")
Output
Category Style Line Number Color Foreground Color
Light abap inherit None
Light algol inherit None
Light algol_nu inherit None
Light arduino inherit None
Light autumn inherit None
Light bw inherit None
Light borland inherit None
Dark coffee #4e4e4e #ddd0c0
Light colorful inherit None
Light default inherit None
Dark dracula #f1fa8c #f8f8f2
Light emacs inherit None
Light friendly_grayscale inherit None
Light friendly #666666 None
Dark fruity inherit #ffffff
Dark github-dark #6e7681 #e6edf3
Dark gruvbox-dark inherit #dddddd
Light gruvbox-light inherit None
Light igor inherit None
Dark inkpot inherit #cfbfad
Dark lightbulb #3c4354 #d4d2c8
- lilypond inherit None
Light lovelace inherit None
Light manni inherit None
Dark material #37474F #EEFFFF
Dark monokai inherit #f8f8f2
Light murphy inherit None
Dark native #aaaaaa #d0d0d0
Dark nord-darker #D8DEE9 #d8dee9
Dark nord #D8DEE9 #d8dee9
Dark one-dark inherit #ABB2BF
Dark paraiso-dark inherit #e7e9db
Light paraiso-light inherit #2f1e2e
Light pastie inherit None
Light perldoc inherit None
Light rainbow_dash inherit #4d4d4d
Dark rrt inherit #dddddd
Light sas inherit None
Dark solarized-dark #586e75 #839496
Light solarized-light #93a1a1 #657b83
Light staroffice inherit #000080
Dark stata-dark inherit #cccccc
Light stata-light inherit #111111
Light tango inherit None
Light trac inherit None
Dark vim inherit #cccccc
Light vs inherit None
Light xcode inherit None
Dark zenburn #5d6262 #dcdccc

Note:

  • The styles listed above only include Pygments' built-in styles. If you have additional styles installed, the actual output will be more extensive.
  • Foreground color: Prepending # to color strings (e.g., ddd0c0) helps contrast them with line number colors. In reality, the raw foreground color output does not include the # prefix.

LGTM! Thank you, @behackl and @nikolajmunk, for reviewing!

@Helbronner

Helbronner commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

I identified an issue during testing. If users don't set a paragraph color, everything looks as expected. However, if they try to change the line number color by setting the paragraph color, it breaks the original styling for code snippets.

Style Before After Commit ID Status
xcode xcode-2-before xcode-2-after d360a05 newer
xcode xcode-1-before xcode-1-after aa7a1c6 older
Test script Test commit d360a05
from typing import Any

from manim import *
from pygments.styles import STYLE_MAP


class Test(Scene):
    def construct(self):

        default_background_config: dict[str, Any] = {
            "buff": 0.3,
            # "fill_color": ManimColor("#222"),  # Here
            "stroke_color": WHITE,
            "corner_radius": 0.2,
            "stroke_width": 1,
            "fill_opacity": 1,
        }

        default_paragraph_config: dict[str, Any] = {
            "font": "Monospace",
            "font_size": 24,
            "line_spacing": 0.5,
            "disable_ligatures": True,
            "color": "GREEN",  # Here
        }

        # file: str = "code_snippets.py"
        code_snippets: str = """from collections.abc import Iterator


# This is an example
class Math:
    @staticmethod
    def fib(n: int) -> Iterator[int]:
        \"""Fibonacci series up to n.\"""
        a, b = 0, 1
        while a < n:
            yield a
            a, b = b, a + b


result = sum(Math.fib(42))
print(f"The answer is {result}")
"""

        rendered_code = Code(
            # code_file=file,
            code_string=code_snippets,
            language="python",
            formatter_style="xcode",  # Here
            tab_width=4,
            add_line_numbers=True,
            line_numbers_from=1,
            background="window",
            background_config=default_background_config,
            paragraph_config=default_paragraph_config,
        )

        self.add(rendered_code)
        self.wait(2)

This happens because the line number color and paragraph color are bound together—changing one inevitably changes the other.

Resolving this properly is a bit complex for now. Therefore, I propose reverting to commit aa7a1c6, where the default line number color is GRAY and users cannot modify it via paragraph_config. If users wish to customize the line number color, they would need to modify the source code directly. In other words, the current version will not support custom line number colors out of the box.

Another reason I suggest reverting to commit aa7a1c6 is that the core question is whether we should allow users to customize styles. I believe the answer is yes, but we can table that discussion for later.

Could we focus on getting this PR merged first to support light styles for code snippets?

For future reference, here are a few ideas on how we might handle custom styles down the road:

  1. Allow configuring line number colors and paragraph colors independently.
  2. Leverage Pygments' Write your own style functionality.

Thanks again!

@behackl

behackl commented Aug 7, 2026

Copy link
Copy Markdown
Member

I'll think about this a bit more, but after some more reflection I now believe that what we should actually do is teach people that in order to customise the color scheme rendered by Code they should modify / customise their pygments theme by documenting this accordingly. Pygments should have ownership over the color scheme, paragraph_config is intended for general typographic adjustments of the rendered code (think line height).

If pygments says inherit, then we inherit the color from the foreground text color. If it specifies a color, we use that. And perhaps we should just rip out the color handling that we have introduced here altogether; makes for a somewhat simpler implementation too.

I'd be willing to implement some shallow helpers to make interaction with pygments easier and save the user an import; Code.get_style("...") etc. Thoughts?

@Helbronner

Helbronner commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

I agree with you, @behackl.

Ideally, styling should be fully delegated to Pygments. Therefore, we won't allow users to modify styles directly via configs like paragraph_config or line_number_config.

We can write docs guiding users on how to leverage Pygments' native capabilities (Write your own style) for custom styling, treating it as an advanced topic.

As a result, commit d360a05 works great. If users still pass color via paragraph_config, we can consider it an unsupported workaround (which is actually inevitable due to the class hierarchy between Paragraph and Text).

@behackl

behackl commented Aug 7, 2026

Copy link
Copy Markdown
Member

Okay -- in this case, (and hopefully for the last time :-)) I've pushed some more changes that refactor the handling of colors with respect to paragraph_config -- colors are now effectively ignored from there, and the pygments style is used as the single source of truth.

I've also added a bunch of explicit documentation, should appear soon in the preview docs at https://manimce--4816.org.readthedocs.build/en/4816/reference/manim.mobject.text.code_mobject.Code.html#manim.mobject.text.code_mobject.Code.

I'll leave this open until you've had the chance to take another look and see whether it works for your usecase -- then we can get this merged. Thanks again for the constructive feedback!

@nikolajmunk

Copy link
Copy Markdown
Contributor

IMO, config dicts for style overrides are common enough in Manim that it seems entirely natural to let people use them here as well, even for colors. As far as I know, nowhere else in Manim do we try to protect the user from passing something "stupid" in a config dict (off the top of my head, the Axes family is treacherous ground currently).

But this can be the topic of another PR :)

Comment thread manim/mobject/text/code_mobject.py Outdated
@Helbronner

Copy link
Copy Markdown
Contributor Author

Hi @nikolajmunk, while enabling users to override paragraph_config is indeed a straightforward approach, the implementation complexity outweighs the convenience it provides. It might be better to let Pygments manage it uniformly. I see this as a classic trade-off with no inherent right or wrong—just different priorities.

@Helbronner

Helbronner commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Everything looks good! The doc preview is available via this link.

Thank you so much for the feedback and guidance! Always happy to contribute to such an awesome community.

@behackl

behackl commented Aug 7, 2026

Copy link
Copy Markdown
Member

Thanks, everyone!

@behackl
behackl merged commit ac0a83a into ManimCommunity:main Aug 7, 2026
17 checks passed
@behackl behackl added enhancement Additions and improvements in general breaking changes This PR introduces breaking changes labels Aug 7, 2026
@behackl behackl changed the title fix(code): inherit container background and adjust line number color Delegate color handling in Code to pygments and add instructions for creating custom styles Aug 7, 2026
@Helbronner
Helbronner deleted the fix-code-background-color branch August 7, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking changes This PR introduces breaking changes enhancement Additions and improvements in general

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code class: background color should adapt to formatter_style instead of defaulting to #222

3 participants