# postcss-complementary

> A PostCSS plugin to get the complementary of a color

Latest version **1.1.1** (published 2018-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-complementary
pnpm add postcss-complementary
yarn add postcss-complementary
bun add postcss-complementary
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-03-12 |
| First published | 2018-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.0.0 |
| Dependencies | 3 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Arpad Hegedus |
| Maintainers | arpadhegedus |
| Keywords | postcss, postcss-plugin, preprocessor, plugin, css, style, complementary, chromatism, color |

## Links

- npm: https://www.npmjs.com/package/postcss-complementary
- Repository: https://github.com/arpadHegedus/postcss-complementary
- Homepage: https://github.com/arpadHegedus/postcss-complementary#readme
- Issues: https://github.com/arpadHegedus/postcss-complementary/issues
- npm.io page: https://npm.io/package/postcss-complementary

## Dependencies (3)

- [postcss](https://npm.io/package/postcss.md) ^6.0.19
- [chromatism](https://npm.io/package/chromatism.md) ^3.0.0
- [postcss-plugin-utilities](https://npm.io/package/postcss-plugin-utilities.md) ^2.2.2

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2018-03-12
- 1.1.0 — 2018-03-12
- 1.0.0 — 2018-03-12

## README

# PostCSS Complementary [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">](https://github.com/postcss/postcss)
[![NPM Version](https://img.shields.io/npm/v/postcss-complementary.svg)](https://www.npmjs.com/package/postcss-complementary)
[![Build Status](https://travis-ci.org/arpadHegedus/postcss-complementary.svg?branch=master)](https://travis-ci.org/arpadHegedus/postcss-complementary)
[![BGitter Chat](https://img.shields.io/badge/chat-gitter-blue.svg)](https://gitter.im/postcss/postcss)

A [PostCSS](https://github.com/postcss/postcss) plugin to get the complementary of a color


## Installation

```
npm install postcss-complementary
```

## Examples

### Get complementary of a color

```css
/* input */
div { color: complementary(#34bbed) }
```
```css
/* output */
div { color: #ed6634 }
```

### Get a uniform complementary of a color (complementary that also has the same apparent lightness)

```css
/* input */
div { color: complementary(#34bbed, uniform) }
```
```css
/* output */
div { color: #e6a12d }
```

## Options

| Option | Type | Default | Description |
|:---:|:---:|:---:|:---:|
| `uniform` | Boolean | `false` | Whether or not to use the uniform complementary as the default for the plugin |


## Usage

### [Postcss JS API](https://github.com/postcss/postcss#js-api)

```js
postcss([require('postcss-complementary')]).process(yourCSS);
```

### [Gulp](https://github.com/gulpjs/gulp)

```js
const gulp = require('gulp');
const postcss = require('gulp-postcss');
const complementary = require('postcss-complementary');
gulp.task('css', () => {
    gulp.src('path/to/dev/css')
        .pipe(postcss([
            complementary()
        ]))
        .pipe(gulp.dest('path/to/build/css'));
});
```

## Tests

```
npm test
```

## License
This project is licensed under the [MIT License](./LICENSE).

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