1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-11 18:17:48 -05:00
denoland-deno/colors/README.md

29 lines
806 B
Markdown
Raw Normal View History

2018-12-18 23:30:44 -05:00
# colors
2019-01-03 23:13:21 -05:00
Is a basic console color module intended for [Deno](https://deno.land/). It is
inspired by [chalk](https://www.npmjs.com/package/chalk) and
2018-12-18 23:30:44 -05:00
[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
2019-01-10 20:18:21 -05:00
import { color } from "https://deno.land/x/std/colors/mod.ts";
2018-12-18 23:30:44 -05:00
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.
---
2019-01-02 09:56:17 -05:00
Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.