Skip to content

Repository files navigation

woad

Minimal ANSI terminal colour codes, for C

Language License GitHub release Last Commit CI

Table of Contents

Introduction

woad provides the smallest useful set of fixed ANSI SGR colour sequences for library authors. It is not a console or TUI framework.

woad is the C implementation.

Installation

woad is a header-only C library. Install via CMake:

cmake -S . -B _build
cmake --build _build
cmake --install _build

Use via include:

#include <woad/woad.h>

puts(WOAD_FG_GREEN "ok" WOAD_RESET);

Building

From a clone, the Synesis helper scripts are:

./prepare_cmake.sh
./build_cmake.sh
./ctest_cmake.sh --verbose

Equivalent raw CMake:

cmake -S . -B _build -DCMAKE_BUILD_TYPE=Release
cmake --build _build
ctest --test-dir _build --output-on-failure

Components

woad ships SGR string macros (WOAD_RESET, WOAD_FG_*, WOAD_BG_*, including bright variants) and version macros (WOAD_VER_MAJOR, WOAD_VER_MINOR, WOAD_VER_PATCH, WOAD_VER_REVISION, WOAD_VER_ALPHABETA, WOAD_VER, WOAD_VER_STRING). TTY/stream gating and Windows virtual-terminal opt-in are not implemented yet.

Project Information

Where to get help

GitHub Page

Contribution guidelines

Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/woad.

Dependencies

Efferent (fan-out)

None.

Development Dependencies

  • CMake 3.16 or later;
  • a C11 toolchain (C90-capable MSVC is accepted on older Visual C++);

Afferent (fan-in)

None (currently).

Related projects

License

woad is released under the 3-clause BSD license. See LICENSE for details.

About

Rock-bottom colour library, for C (and C++)

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages