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

Improve colors' appearance in the editor's print_rich() output #77114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented May 15, 2023

This matches most terminals' behavior which don't use "pure" ANSI colors anymore, but use modern color palettes instead. This improves readability and allows the colors to adapt to a light-theme editor.

Testing project: test_richtextlabel_color_alias.zip

Preview

Screenshot_20230516_000009

image

How it looks like in VS Code's integrated terminal for comparison (using the default Dark Modern theme):

Screenshot_20230516_000050

image

@Calinou Calinou added this to the 4.x milestone May 15, 2023
@Calinou Calinou force-pushed the editor-print-rich-improve-colors branch from 4a0c40b to 81cfa0d Compare May 15, 2023 22:15
@Riteo
Copy link
Contributor

Riteo commented May 16, 2023

I approve the idea but IMO I feel like some colors, especially red and green, are a bit washed out. Could they be saturated a little bit more? Look at VSCode in comparison.

@Calinou
Copy link
Member Author

Calinou commented May 16, 2023

I approve the idea but IMO I feel like some colors, especially red and green, are a bit washed out. Could they be saturated a little bit more? Look at VSCode in comparison.

I've reused the editor's error (red), warning (yellow) and success (green) colors. The blue color is based on the default accent color (but it does not change if you customize the accent color). I guess we could make those colors more saturated to match the increased icon saturation in 4.0.

@Riteo
Copy link
Contributor

Riteo commented May 16, 2023

@Calinou

I've reused the editor's error (red), warning (yellow) and success (green) colors. The blue color is based on the default accent color (but it does not change if you customize the accent color).

Oh, I see, so this is a more general problem. I'd saturate everything honestly. The question then becomes: do we saturate everything in one PR or in two parts (default and print_rich)?

@Calinou
Copy link
Member Author

Calinou commented May 16, 2023

The question then becomes: do we saturate everything in one PR or in two parts (default and print_rich)?

These can be done independently, so I think it's best to do that in a separate PR. We may want to further tweak the light theme colors for those as well.

@Riteo
Copy link
Contributor

Riteo commented May 16, 2023

@Calinou all right.

editor/editor_log.cpp Outdated Show resolved Hide resolved
editor/editor_log.cpp Outdated Show resolved Hide resolved
This matches most terminals' behavior which don't use "pure" ANSI
colors anymore, but use modern color palettes instead.

Co-authored-by: Danil Alexeev <[email protected]>
@Calinou Calinou force-pushed the editor-print-rich-improve-colors branch from 2e39b6d to ebb6f98 Compare December 6, 2024 18:38
@Calinou
Copy link
Member Author

Calinou commented Dec 6, 2024

Rebased and tested again, it works as expected. This PR now incorporates @dalexeev's BBCode replacement method, so I added them as a co-author.

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

Successfully merging this pull request may close these issues.

4 participants