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

Support true color when setting colors from JQ_COLORS #3288

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

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
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