2 releases

Uses new Rust 2024

0.1.1 Jan 13, 2026
0.1.0 May 3, 2025

#407 in Command-line interface

Download history 61/week @ 2025-10-13 49/week @ 2025-10-20 36/week @ 2025-10-27 30/week @ 2025-11-03 30/week @ 2025-11-10 41/week @ 2025-11-17 29/week @ 2025-11-24 24/week @ 2025-12-01 17/week @ 2025-12-08 35/week @ 2025-12-15 50/week @ 2025-12-22 42/week @ 2025-12-29 49/week @ 2026-01-05 27/week @ 2026-01-12 30/week @ 2026-01-19 30/week @ 2026-01-26

151 downloads per month
Used in 24 crates (7 directly)

MIT license

12KB
339 lines

Tinter

It prints ANSI colored output. That is all.

What is it?

This is a very minimal implementation for generating ANSI escape sequences in Rust.

  • Basic Colors: The standard 8 colors and their slightly-more-exciting "bright" variants.
  • A Color Enum:.
  • A Style Struct:. Only foreground color now
  • A StyledText Wrapper: wrapping your text inside glorious colors.

Why use this (and why you probably shouldn't)

Let's be honest, there are tons of other crates out there that do terminal coloring, and they are generally more robust, feature-rich, and easier to use than this. Crates like yansi, ansi_term, and termcolor.

Why to use it

  • You have a fear of adding external dependencies, even tiny ones (like me).

Probably don't use this if

  • You need robust, cross-platform terminal coloring.
  • You want support for 256 colors, truecolor, or any other fancy features.
  • You prefer well-tested, feature-complete libraries.

Contributing

This code is provided as open source, for anyone who might find it useful or educational. However, please note that we are not seeking contributions or feature requests. It exists primarily as a simple example of direct ANSI escape sequence generation. Feel free to use, modify, or learn from it in your own projects!

License

MIT

Copyright (c) Peter Bjorklund. All rights reserved.

No runtime deps