# colors-md

> Returns terminal escape codes for styling strings.

Latest version **0.0.6** (published 2018-06-01) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install colors-md
pnpm add colors-md
yarn add colors-md
bun add colors-md
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2018-06-01 |
| First published | 2017-07-25 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 83.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Marton Demeter |
| Maintainers | mdemeter |
| Keywords | color, colors |

## Links

- npm: https://www.npmjs.com/package/colors-md
- Repository: https://github.com/marton-demeter/colors-md
- Homepage: https://github.com/marton-demeter/colors-md#readme
- Issues: https://github.com/marton-demeter/colors-md/issues
- npm.io page: https://npm.io/package/colors-md

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 0.0.6 (latest) — 2018-06-01
- 0.0.5 — 2018-05-31
- 0.0.4 — 2017-07-26
- 0.0.3 — 2017-07-26
- 0.0.2 — 2017-07-25
- 0.0.1 — 2017-07-25

## README

## Description

A NodeJS module that returns terminal escape codes for styling strings.<br>
Colors-md can convert to ansi8 and ansi256 color codes.<br>
Currently accepts hex and rgb color input strings.<br>

## Installation

###### Local

```
[sudo] npm install --save colors-md
```

###### Global

```
[sudo] npm install --global colors-md
```

## Usage

#### Color Format Specification

###### Hex

  - '#ffffff'
  - 'ffffff'
  - '#fff'
  - 'fff'

###### RGB

  - '255, 255, 255'
  - '255 255 255'

#### Code


```javascript
const colors = require('colors-md');

console.log(colors.ansi8.hex('#ff0000') + 'text' + colors.reset);
console.log(colors.ansi256.hex('0f0') + 'text' + colors.reset);

console.log(colors.ansi8.rgb('0, 0, 255') + 'text' + colors.reset);
console.log(colors.ansi256.rgb('255 255 255') + 'text' + colors.reset);
```

---
_Source: https://npm.io/package/colors-md · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
