Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ANSI.format lets a C1 CSI set a color

Open Beginner friendly
#2,113 0 comments 0 reactions 0 assignees View on GitHub

@SashaMIT is already working on this.

Since Oct 1, 2026.

  • #2114 by @SashaMIT — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start by locating ansi_escape and the ANSI.format and % handling paths mentioned in the issue. Reproduce both cases with C1 CSI input, then verify that template control sequences retain their intended color while argument values render with ? in place of the escape sequence and cannot set a color.

Written by the indexing model from the issue text.

Description

ANSI("x{}").format("\x9b31mRED") returns RED in ansired. The same value with % does it too.

\x1b[31mRED is already turned into a question mark. \x9b is the C1 form of ESC [, and ansi_escape only replaces \x1b and backspace.

ANSI("\x9b32mOK") in the template should stay green. An argument should come back as ?31mRED with no color.

Dominant language
Python
Stars
10.6k
Forks
819
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from prompt-toolkit/python-prompt-toolkit

All issues in prompt-toolkit/python-prompt-toolkit

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.