# colorbrewer

> A shim module of colorbrewer2 by Cythina Brewer for browserify

Latest version **1.7.0** (published 2026-03-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install colorbrewer
pnpm add colorbrewer
yarn add colorbrewer
bun add colorbrewer
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.7.0 |
| Published | 2026-03-26 |
| First published | 2014-06-30 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 115.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 39 |
| Author | Cynthia Brewer |
| Maintainers | saikocat |
| Keywords | colors, design, visualization, cartography, svg, d3, browserify |

## Links

- npm: https://www.npmjs.com/package/colorbrewer
- Repository: https://github.com/saikocat/colorbrewer
- Homepage: http://colorbrewer2.org/
- Issues: https://github.com/saikocat/colorbrewer/issues
- npm.io page: https://npm.io/package/colorbrewer

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 1.7.0 (latest) — 2026-03-26
- 1.6.2 — 2026-02-27
- 1.6.1 — 2025-04-22
- 1.6.0 — 2025-04-18
- 1.5.9 — 2024-12-15
- 1.5.8 — 2024-12-15
- 1.5.7 — 2024-09-28
- 1.5.6 — 2023-10-11
- 1.5.5 — 2023-10-11
- 1.5.4 — 2023-10-11
- 1.5.3 — 2022-11-11
- 1.5.2 — 2022-02-15
- 1.5.1 — 2021-03-30
- 1.5.0 — 2021-03-21
- 1.4.0 — 2021-01-30
- … 5 more at https://npm.io/package/colorbrewer/versions

## README

colorbrewer
===========

Color specifications and designs developed by Cynthia Brewer (http://colorbrewer2.org/).

This is a shim module of colorbrewer2 by Cythina Brewer for browserify.

It is also a shim for the [files provided in d3.js lib](https://github.com/d3/d3-scale-chromatic).

Access color schemes by name and the number of discrete colors needed, such as `colorbrewer.Blues[5]`. For a list of color schemes by group, use `colorbrewer.schemeGroups`. Example:

```js
const colorbrewer = require('colorbrewer');

console.log(colorbrewer.schemeGroups.sequential);
// ["BuGn","BuPu","GnBu",...]

console.log(colorbrewer.Blues[5]);
// ["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"]
```

## Notes:
* `1.6.1` is a major update that enable TypeScript to work correctly, and modernize the rollup build process.
* `1.5.0` is using rollup to generate both UMD and ES module so hopefully this will resolve the problems for most of us.

## Versions to avoid:
* `1.6.0` due to missing `index.es.js` in packaging.
* There is a compatibility issue with `1.4.0` so do lock your version to `1.3.0` for now.


## Huge thanks to:
* Brian Moran - [moranbw](https://github.com/moranbw) - for TypeScript import and build process enhancement since version `1.6.1`
* Connor Peet - [connor4312](https://github.com/connor4312) - for adding initial
  support for TypeScript since version `1.4.0`

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