Skip to content

feat: add ANSI background color helpers#5

Merged
razbuild merged 1 commit into
razbuild:masterfrom
snoopuppy582:feat/4-background-colors
May 12, 2026
Merged

feat: add ANSI background color helpers#5
razbuild merged 1 commit into
razbuild:masterfrom
snoopuppy582:feat/4-background-colors

Conversation

@snoopuppy582
Copy link
Copy Markdown
Contributor

Fixes #4

Summary

Adds background color helpers for the standard ANSI background color range, including bright variants.

Changes

  • Added BACKGROUND_COLORS with bg_* helper generation on RazTint.
  • Added module-level exports such as bg_red, bg_blue, and bg_bright_white.
  • Added RazTint.background() using \033[49m so background reset does not clear an outer foreground color.
  • Added unit tests for dynamic methods, disabled color mode, ANSI reset behavior, and module-level helpers.
  • Updated README examples and API reference.

Testing

  • uv run --extra dev ruff check .
  • uv run --extra dev black --check .
  • uv run --extra dev pytest -q -> 41 passed
  • uv run --extra dev ty check src

Notes

No external dependencies were added.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@razbuild razbuild merged commit af1c343 into razbuild:master May 12, 2026
17 checks passed
@razbuild
Copy link
Copy Markdown
Owner

Great job @snoopuppy582! This is really clean and well-tested. Thank you!

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.

[Feature] Add background color support (ANSI background codes)

2 participants