Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix the default colors to use 39, the default foreground color #2904

Merged
merged 3 commits into from
Sep 22, 2023

Conversation

taoky
Copy link
Contributor

@taoky taoky commented Sep 18, 2023

This reverts commit 07b18a3, and fix #2903.

According to Linux manpage console_codes(4), "color 39" is not a undefined value:

39         set default foreground color (before Linux 3.16: set underscore off, set default foreground color)

I'm afraid that what in #2032 does not hold, and setting its value to 37 hurts users with light background, as "color 37" is:

37         set white foreground

@taoky
Copy link
Contributor Author

taoky commented Sep 18, 2023

And according to ECMA standard:

https://www.ecma-international.org/wp-content/uploads/ECMA-48_2nd_edition_august_1979.pdf, page 41 (PDF page 49):

39 (reserved for future standardization)

https://www.ecma-international.org/wp-content/uploads/ECMA-48_3rd_edition_march_1984.pdf, page 46 (PDF page 53), and https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf, page 62 (PDF page 76):

39 default display colour (implementation-defined)

@nicowilliams nicowilliams self-requested a review September 19, 2023 22:31
@nicowilliams
Copy link
Contributor

nicowilliams commented Sep 19, 2023

Wouldn't we also need to update the main manual?

Otherwise LGTM.

@itchyny itchyny changed the title Revert "Update other manual and source to use ;37" Fix the default colors to use 39, the default foreground color Sep 22, 2023
@itchyny itchyny merged commit 8f81668 into jqlang:master Sep 22, 2023
@emanuele6 emanuele6 added the bug label Sep 28, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default color of jq is indistinguishable under Solarized Light background
4 participants