Skip to content

sqlx-cli: drop the literal style override that was invisible on light terminals#4263

Open
c-tonneslan wants to merge 2 commits into
transact-rs:mainfrom
c-tonneslan:fix/help-text-visible-light-terminal
Open

sqlx-cli: drop the literal style override that was invisible on light terminals#4263
c-tonneslan wants to merge 2 commits into
transact-rs:mainfrom
c-tonneslan:fix/help-text-visible-light-terminal

Conversation

@c-tonneslan

@c-tonneslan c-tonneslan commented May 11, 2026

Copy link
Copy Markdown

Fixes #4112.

AnsiColor::White is invisible on light/white terminal backgrounds. Dropping the explicit .literal() style lets it fall back to the terminal default, which is readable on both light and dark terminals.

(Initial version switched to Cyan; per maintainer feedback, default is fine.)

White is invisible on light terminal backgrounds. Cyan is readable on both
light and dark backgrounds, so it's a better default for the literal style.

Fixes transact-rs#4112
Comment thread sqlx-cli/src/opt.rs Outdated
.header(AnsiColor::Blue.on_default().bold())
.usage(AnsiColor::Blue.on_default().bold())
.literal(AnsiColor::White.on_default())
.literal(AnsiColor::Cyan.on_default())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.literal(AnsiColor::Cyan.on_default())

The default color is readable as well.

Default terminal color is readable on both light and dark backgrounds,
which is the original bug. No need to pick a specific replacement color.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
@c-tonneslan c-tonneslan changed the title sqlx-cli: use cyan instead of white for help text literals May 26, 2026
@c-tonneslan

c-tonneslan commented May 26, 2026

Copy link
Copy Markdown
Author

Thanks, good call. Dropped the line and updated the PR title/body to match.

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

Labels

None yet

2 participants