# Console.hx – library for coloring terminal output

**URL:** https://community.haxe.org/t/console-hx-library-for-coloring-terminal-output/1984
**Category:** Showcase
**Tags:** scripting
**Created:** [August 24, 2019, 11:00am UTC](https://community.haxe.org/t/console-hx-library-for-coloring-terminal-output/1984 "2019-08-24T11:00:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![haxiomic](https://community.haxe.org/user_avatar/community.haxe.org/haxiomic/32/75_2.png) [@haxiomic](https://community.haxe.org/u/haxiomic)
#### Post date: [August 24, 2019, 11:00am UTC](https://community.haxe.org/t/console-hx-library-for-coloring-terminal-output/1984/1 "2019-08-24T11:00:50Z")

</div>

Hey all :),

I tend to do a fair bit of scripting with haxe and I find handy to be able to color the output to highlight the most important information

I wanted to share a little library I use to make my terminal output pretty in case it’s helpful to others! [Console.hx (GitHub)](https://github.com/haxiomic/console.hx)

Console.hx lets you use HTML-like tags to set color and formatting, here’s some examples

```haxe
Console.log('<cyan>Hello</>, <b>World!</>');

```

![53](https://community.haxe.org/uploads/default/original/1X/4e0d819c29db41c72c9f641bf545ae02d27a0ac8.png)

```haxe
Console.error('<b>HTTP Error</b>: <white>404</> <yellow>File not found</>');

```

![57](https://community.haxe.org/uploads/default/original/1X/ffbc3a6ea0ddca37971a9d5606ffa24ed49ec3a4.png)

Console.examine() is a macro that prints the variable names along side their values, for all those printf debuggers out there this will save you some time 🙂

```haxe
var x = 31.1;
var y = 65.3;
var name = 'Douglas Adams';
Console.examine(x, y, name);

```

![21](https://community.haxe.org/uploads/default/original/1X/56c330fbe8c1a98edd2e74c351678bc372f6e9b0.png)

It will also work in browser consoles too

---

<div class="post-metadata">

### Author: ![uvtc](https://community.haxe.org/user_avatar/community.haxe.org/uvtc/32/1198_2.png) [@uvtc](https://community.haxe.org/u/uvtc)
#### Post date: [August 24, 2019, 6:03pm UTC](https://community.haxe.org/t/console-hx-library-for-coloring-terminal-output/1984/2 "2019-08-24T18:03:14Z")

</div>

Thanks, George! So easy to use!
