Skip to content

v0.3.0

Choose a tag to compare

@lloydrichards lloydrichards released this 14 Sep 10:26
· 207 commits to main since this release

v0.3.0 (2025-09-14)

Have done some refactoring to make it easier to include additional color and font styles. The big new feature is the new programatic colors with Ansi.color256 and Ansi.colorRGB which allow for constructing any 8-bit or 24-bit color in the terminal:

// 256-color foreground
const brightRedBox = Box.text("256-color!").pipe(
  Box.annotate(Ansi.color256(196)) // bright red
);
const brightGreenBox = Box.text("256-color!").pipe(
  Box.annotate(Ansi.color256(34)) // bright green
);

// Truecolor (RGB) foreground
const cyanBox = Box.text("RGB!").pipe(
  Box.annotate(Ansi.colorRGB(0, 255, 255)) // cyan
);
const orangeBox = Box.text("RGB!").pipe(
  Box.annotate(Ansi.colorRGB(255, 160, 0)) // orange
);

// Combine bold + RGB foreground + 256-color background
const combined = pipe(
  Box.text("Styled text"),
  Box.annotate(
    Ansi.combine(
      Ansi.bold,
      Ansi.colorRGB(255, 160, 0), // orange
      Ansi.bgColor256(235) // dim background
    )
  )
);

There are also the addition of several new text styles that can be be combined:

  • dim
  • italic
  • blink
  • inverse
  • hidden
  • strikethrough
  • overline

Features

  • ✨ added color256 and colorRGB
  • ✨ extended TypeStyles

Fix

  • 🐛 nested annotations being reset (#1)

Misc

  • 📄 added AGENTS.md

Full Changelog: v0.2.0...v0.3.0