Color – Go package for adding ANSI colours

Color is a Go package for adding ANSI colours and text attributes to terminal output.

It provides convenient helper functions, reusable colour definitions and support for standard and 24-bit RGB colours.

This is free and open source software.

Key Features

  • Prints text using standard ANSI foreground and background colours.
  • Supports bold, italic, underline, blink, reverse-video and other text attributes.
  • Provides 24-bit RGB foreground and background colours.
  • Combines multiple colours and attributes into reusable definitions.
  • Offers Print, Printf, Println and string-formatting helper functions.
  • Writes coloured output to custom io.Writer destinations.
  • Can apply colours to existing fmt-based code using Set and Unset functions.
  • Automatically disables colour for non-terminal output streams.
  • Respects the NO_COLOR environment variable.
  • Allows colour output to be enabled or disabled globally or per colour definition.
  • Supports Linux, macOS and Windows.

Website: github.com/fatih/color
Support:
Developer: Fatih Arslan
License: MIT License

color

Color is written in Go. Learn Go with our recommended free books and free tutorials.


Related Software

Terminal String Styling Libraries
colorGo package for adding colour to terminal output
termenvAdvanced ANSI styling and terminal rendering for Go
owo_colors Zero-allocation terminal colour library for Rust
AnsisSmall, fast library for styling terminal text
anstyleRust libraries for ANSI text styling

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted