Skip to content

Add customizable Themes and Highlighters for rich colors in print_msg#5169

Draft
Crivella wants to merge 1 commit intoeasybuilders:developfrom
Crivella:feature-rich_themes
Draft

Add customizable Themes and Highlighters for rich colors in print_msg#5169
Crivella wants to merge 1 commit intoeasybuilders:developfrom
Crivella:feature-rich_themes

Conversation

@Crivella
Copy link
Copy Markdown
Contributor

@Crivella Crivella commented Apr 9, 2026

This is a followup on

With this PR, Easybuild ships its own highlighter and theme that can be replaced using entrypoints (for now only the theme) using the following groups

  • easybuild.rich_theme: A dictionary that defines the rich theme to be used

TODO:

  • Expand what EB should highlight by default
  • Define a good color scheme to avoid too much clutter
  • Add to the entrypoint documentation
  • Tests

Example of themes via entrypoints:

@Crivella
Copy link
Copy Markdown
Contributor Author

Crivella commented Apr 9, 2026

@boegel @smoors Let me know design-wise what you think about this, if it is worth investing more time in trying to expand this more (eg also make the highlighter pluginable).

In general going to need feedback on colors and patterns, my UI design skills are not the best so i am afraid of going full rainbow with the colors

@smoors
Copy link
Copy Markdown
Contributor

smoors commented Apr 18, 2026

looks good to me design-wise!
i quickly tested it and it works well, also with the entrypoints.

it would be nice if you can also add support for customizing the things that are colored automatically, like paths, numbers, ... (i'm not a fan of the default colors)

i can come up with a default color scheme, but i don't want to get into a bike-shedding match :)

@Crivella
Copy link
Copy Markdown
Contributor Author

It is already possible by overriding the defaults styles the same way you would by setting easybuild.success and similar

You can see all the defaults with python -m rich.default_styles

@smoors
Copy link
Copy Markdown
Contributor

smoors commented Apr 19, 2026

It is already possible by overriding the defaults styles the same way you would by setting easybuild.success and similar

You can see all the defaults with python -m rich.default_styles

cool, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants