# feedback-color

> Sass function that returns a feedback color (warning, error, or success) based on a color it's given.

Latest version **1.0.0** (published 2017-07-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install feedback-color
pnpm add feedback-color
yarn add feedback-color
bun add feedback-color
```

## 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.0.0 |
| Published | 2017-07-14 |
| First published | 2017-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Pixel Union |
| Maintainers | pixelunion |

## Links

- npm: https://www.npmjs.com/package/feedback-color
- Repository: https://github.com/pixelunion/feedback-color
- Homepage: https://github.com/pixelunion/feedback-color#readme
- Issues: https://github.com/pixelunion/feedback-color/issues
- npm.io page: https://npm.io/package/feedback-color

## Recent versions

- 1.0.0 (latest) — 2017-07-14

## README

# Feedback Colors

[![Build Status](https://travis-ci.org/pixelunion/feedback-color.svg?branch=master)](https://travis-ci.org/pixelunion/feedback-color)

When adapting colors for a user interface, a secondary palette is often required for feedback scenarios where a specific type of message must be communicated with the user. Typically, green means success, yellow means warning, and red means error. The problem is not all feedback colors are created equal—an ideal palette is clearly an extension of the interface's primary color.

**Feedback Colors** returns a *success*, *warning*, or *error* color based on a color it is given. The goal is to automate the creation of feedback colors that work harmoniously with a primary palette, while effectively communicating their intended message.

## Installation

##### Using npm
```bash
npm install --save-dev feedback-color
```

##### Old-school method
Download `feedback-color.scss` from the [/src/scss/functions](https://github.com/pixelunion/feedback-color/tree/master/src/scss/functions) directory.

## Usage
Import the `feedback-color` function in your sass.
```scss
@import 'feedback-color';

// Or something like this if you installed with npm
@import '../node_modules/feedback-color/feedback-color';
```

The `feedback-color` function will return a HEX when you pass it a base color and the feedback color type.
```scss
div {
  background-color: feedback-color(#bada55, 'success');
}
```
#### Parameters
Feedback Colors will return a HEX value when passed a `$base-color` and `$feedback-type`.

| Parameter | Accepts | Default |
| --- | --- | --- |
| `$base-color` | A color value in any CSS format | `null` |
| `$feedback-type` | `'success'`, `'warning'`, or `'error'` | `'warning'` |

## License
MIT - [Read full license](https://github.com/pixelunion/feedback-color/tree/master/LICENSE.md)

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