# standard-log-color

> Color console reporter for `standard-log`

Latest version **13.3.3** (published 2026-10-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install standard-log-color
pnpm add standard-log-color
yarn add standard-log-color
bun add standard-log-color
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 13.3.3 |
| Published | 2026-10-31 |
| First published | 2019-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 227.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 8 |
| Author | Homa Wong |
| Maintainers | unional |

## Links

- npm: https://www.npmjs.com/package/standard-log-color
- Repository: https://github.com/cyberuni/standard-log
- Homepage: https://github.com/cyberuni/standard-log/tree/main/packages/color
- Issues: https://github.com/cyberuni/standard-log/issues
- npm.io page: https://npm.io/package/standard-log-color

## Dependencies (3)

- [color-map](https://npm.io/package/color-map.md) ^2.0.6
- [unpartial](https://npm.io/package/unpartial.md) ^1.0.8
- [supports-color](https://npm.io/package/supports-color.md) ^8.1.1

## Recent versions

- 13.3.3 (latest) — 2026-10-31
- 13.3.2 — 2026-10-11
- 13.3.1 — 2026-09-28
- 13.3.0 — 2026-09-07
- 13.2.0 — 2026-09-07
- 13.1.0 — 2026-09-07
- 13.0.2 — 2026-09-02
- 13.0.1 — 2026-09-01
- 13.0.0 — 2026-09-01
- 12.1.2 — 2023-06-13
- 12.1.1 — 2023-04-22
- 12.1.0 — 2023-04-17
- 12.0.5 — 2023-04-15
- 12.0.4 — 2023-04-15
- 12.0.3 — 2023-04-14
- … 76 more at https://npm.io/package/standard-log-color/versions

## README

# standard-log-color

[![NPM version][npm-image]][npm-url]
[![NPM downloads][downloads-image]][downloads-url]

[![Github NodeJS][github-nodejs]][github-action-url]
[![Codecov][codecov-image]][codecov-url]

[![Visual Studio Code][vscode-image]][vscode-url]

[standard-log-color] provides a log reporter that will color the logger id for [standard-log].

This makes the log pops and is easier to spot where the log is coming from.

## Install

```sh
npm install standard-log-color
yarn add standard-log-color
```

## Usage

```ts
import { createStandardLog } from 'standard-log'
import { createColorLogReporter } from 'standard-log-color'

const standardLog = createStandardLog({
   reporters: [createColorLogReporter({ ... })]
})

const log = standardLog.getLogger(...)
log.info('with color!')
```

![Rendering example][rendering-example]

By default, it will use ansi formatter in NodeJS and css formatter in browser.

If you want to change that, or use your own formatter:

```ts
import { createColorLogReporter } from 'standard-log-color'

createColorLogReporter({
  formatter: yourFormatter
})
```

For `createCssLogFormatter()`, you can specify how many colors to use:

```ts
import { createCssLogFormatter } from 'standard-log-color'

createCssLogFormatter({ maxColor: 30 })
```

You can also add `timestamp`:

```ts
import { createAnsiLogFormatter, createCssLogFormatter } from 'standard-log-color'

createAnsiLogFormatter({ timestamp: 'none' })
createAnsiLogFormatter({ timestamp: 'iso' })
createAnsiLogFormatter({ timestamp: 'elapsed' })

createCssLogFormatter({ timestamp: 'none' })
createCssLogFormatter({ timestamp: 'iso' })
createCssLogFormatter({ timestamp: 'elapsed' })
```

[codecov-image]: https://codecov.io/gh/cyberuni/standard-log/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/cyberuni/standard-log
[downloads-image]: https://img.shields.io/npm/dm/standard-log-color.svg?style=flat
[downloads-url]: https://npmjs.org/package/standard-log-color
[github-action-url]: https://github.com/cyberuni/standard-log/actions
[github-nodejs]: https://github.com/cyberuni/standard-log/actions/workflows/release.yml/badge.svg
[npm-image]: https://img.shields.io/npm/v/standard-log-color.svg?style=flat
[npm-url]: https://www.npmjs.com/package/standard-log-color
[vscode-image]: https://img.shields.io/badge/vscode-ready-green.svg
[vscode-url]: https://code.visualstudio.com/
[rendering-example]: https://github.com/cyberuni/standard-log/tree/main/images/color-log.png
[standard-log]: https://github.com/cyberuni/standard-log

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