A small terminal colorizer with helpers for headings, status messages, lists, prompts, and figlet logos.
Install · Quick start · Themes · Examples · API
- 🎨 Simple painting: wrap any string in a color with
colorizer.paint() - 🧱 Ready-made helpers: section headings, success/info/warning/error messages, lists, and prompts
- 🔤 Figlet logos: big ASCII banners for your CLI's splash screen
- 🌈 Four built-in themes:
ocean,ember,forest,mono - 🔌 Switchable output: pass
enabledto turn colors on or off in one place - 🧩 Typed: written in TypeScript, with declarations in
types/ - ⚡ Bun-first: fast install, fast tests, runnable examples
bun installimport { Colorizer, Colors } from "./index.ts";
const colorizer = new Colorizer({ enabled: true });
console.log(colorizer.paint("Hello", Colors.GREEN));
colorizer.section("Status", Colors.CYAN);
colorizer.success("Everything is wired up.");That's the whole setup: create a Colorizer, then print.
Every theme ships with the same set of colors for accents, success, info, warning, and error states, so swapping themes never changes your layout, only the mood. Each preview below is a live-typing terminal window.
|
ocean · the default |
ember · warm and loud |
|
forest · calm and green |
mono · no color, all contrast |
Note
The animations above are illustrative previews. Run the examples locally to see real output in your own terminal.
bun run example # dashboard with the default ocean theme
bun run example ocean # dashboard with a specific theme
bun run example:gallery # every theme variation
bun run example:basic # minimal usage| Command | What you get |
|---|---|
bun run example |
Full dashboard in the default ocean theme |
bun run example <theme> |
Same dashboard in ocean, ember, forest, or mono |
bun run example:gallery |
Every theme rendered back to back |
bun run example:basic |
The smallest possible working script |
| Piece | Purpose |
|---|---|
new Colorizer({ enabled }) |
Create a colorizer; enabled toggles color output |
colorizer.paint(text, color) |
Return text wrapped in the given color |
colorizer.section(title, color) |
Print a colored section heading |
colorizer.success(message) |
Print a success status line |
Colors |
Color constants such as Colors.GREEN and Colors.CYAN |
Lists, prompts, and figlet logos follow the same pattern. See lib/ and examples/ for the full set.
tint/
├── index.ts # public entry point
├── lib/ # colorizer implementation
├── types/ # type declarations
├── examples/ # runnable demos (dashboard, gallery, basic)
└── test/ # bun test suite
bun testThe SVGs in assets/ are generated, so you can edit palettes or lines and rebuild:
bun scripts/gen-assets.mjsIssues and pull requests are welcome. If you add a theme, add it to the palette list in scripts/gen-assets.mjs so it shows up in the gallery above.
Released under the MIT License.
Copyright (c) 2026 0xRahim