# shader

> Create a darker or lighter shade of a hex color.

Latest version **1.0.0** (published 2017-12-31) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-12-31 |
| First published | 2015-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Patrick Burtchaell |
| Maintainers | pburtchaell |
| Keywords | hex values, color, colors, shade, shader, lighten, lighter, light, darken, darker, dark |

## Links

- npm: https://www.npmjs.com/package/shader
- Repository: http://github.com/pburtchaell/shader
- Issues: https://github.com/pburtchaell/shader/issues
- npm.io page: https://npm.io/package/shader

## 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

- 1.0.0 (latest) — 2017-12-31
- 0.1.3 — 2015-02-20
- 0.1.2 — 2015-02-03
- 0.1.1 — 2015-02-03
- 0.1.0 — 2015-02-03

## README

# Color Shader

[![npm version](https://badge.fury.io/js/shader.svg)](http://badge.fury.io/js/shader) [![Dependency Status](https://david-dm.org/pburtchaell/shader.svg)](https://david-dm.org/pburtchaell/shader) [![Build Status](https://travis-ci.org/pburtchaell/shader.svg?branch=master)](https://travis-ci.org/pburtchaell/shader)

Creates darker or lighter shades of a hex color. Originally inspired from [a question](http://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors) on StackOverflow.

## Installation

Install with npm.

```
npm install shader
```

## Usage

```
import shader from 'shader';

const color = '#fff';
const myNewShade = shader(color, -1.0);
```

### Parameters

| param | type   | description                                       |
|-------|--------|---------------------------------------------------|
| color | string | the hex code for the color        |
| value | int | a range from `-1.0` (darkest) to `1.0` (lightest) |

---
Copyright 2015-2017 Patrick Burtchaell. Licensed MIT.

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