Skip to content

Support true color when setting colors from JQ_COLORS#3288

Closed
itchyny wants to merge 1 commit intojqlang:masterfrom
itchyny:improve-jq-colors-true-color
Closed

Support true color when setting colors from JQ_COLORS#3288
itchyny wants to merge 1 commit intojqlang:masterfrom
itchyny:improve-jq-colors-true-color

Conversation

@itchyny
Copy link
Contributor

@itchyny itchyny commented Mar 6, 2025

The buffers for colors were fixed-size and we cannot use longer color
definitions like true color, e.g. JQ_COLORS='38;2;135;200;250', or
both foreground and background colors, e.g. JQ_COLORS='38;5;81;48;5;19'.
This commit fixes the implementation to support longer color definitions
by allocating the buffers dynamically. This resolves #2426.

The buffers for colors were fixed-size and we cannot use longer color
definitions like true color, e.g. `JQ_COLORS='38;2;135;200;250'`, or
both foreground and background colors, e.g. `JQ_COLORS='38;5;81;48;5;19'`.
This commit fixes the implementation to support longer color definitions
by allocating the buffers dynamically. This resolves jqlang#2426.
@itchyny itchyny force-pushed the improve-jq-colors-true-color branch from 90c174e to 44ab720 Compare March 6, 2025 13:29
@itchyny
Copy link
Contributor Author

itchyny commented May 31, 2025

Closing in favor of #3282.

@itchyny
Copy link
Contributor Author

itchyny commented May 31, 2025

I included the tests in d3cf5ca.

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.

JQ_COLORS truecolor support

1 participant