1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-19 04:16:00 -05:00
denoland-deno/colors/README.md

29 lines
806 B
Markdown
Raw Normal View History

2018-12-19 15:30:44 +11: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-19 15:30:44 +11: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-19 15:30:44 +11:00
```ts
2019-01-11 12:18:21 +11:00
import { color } from "https://deno.land/x/std/colors/mod.ts";
2018-12-19 15:30:44 +11: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-19 15:30:44 +11:00
- Test coverage is very basic at the moment.
---
2019-01-02 17:56:17 +03:00
Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.