2018-12-18 23:30:44 -05:00
|
|
|
# colors
|
|
|
|
|
|
|
|
Is a basic console color library intended for [Deno](https://deno.land/). It is
|
|
|
|
inspired by packages like [chalk](https://www.npmjs.com/package/chalk) and
|
|
|
|
[colors](https://www.npmjs.com/package/colors) on npm.
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2018-12-24 10:28:01 -05:00
|
|
|
The main modules exports a single function name `color` which is a function that
|
|
|
|
provides chaining to stack colors. Basic usage looks like this:
|
2018-12-18 23:30:44 -05:00
|
|
|
|
|
|
|
```ts
|
|
|
|
import { color } from "https://deno.land/x/colors/main.ts";
|
|
|
|
|
|
|
|
console.log(color.bgBlue.red.bold("Hello world!"));
|
|
|
|
```
|
|
|
|
|
|
|
|
## TODO
|
|
|
|
|
|
|
|
- Currently, it just assumes it is running in an environment that supports ANSI
|
2018-12-24 10:28:01 -05:00
|
|
|
escape code terminal coloring. It should actually detect, specifically windows
|
|
|
|
and adjust properly.
|
2018-12-18 23:30:44 -05:00
|
|
|
|
|
|
|
- Test coverage is very basic at the moment.
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
Copyright 2018 the Deno authors. All rights reserved. MIT license.
|