# spectra

> Javascript color manipulation library.

Latest version **0.2.3** (published 2014-07-30) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2014-07-30 |
| First published | 2013-12-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 238 |
| Author | Aakash Patel |
| Maintainers | aakpat6 |

## Links

- npm: https://www.npmjs.com/package/spectra
- Repository: https://github.com/avp/spectra
- Issues: https://github.com/avp/spectra/issues
- npm.io page: https://npm.io/package/spectra

## Recent versions

- 0.2.3 (latest) — 2014-07-30
- 0.2.2 — 2014-04-18
- 0.2.1 — 2014-02-16
- 0.2.0 — 2014-02-05
- 0.1.0 — 2013-12-17

## README

Spectra
=======
[![Build Status](http://img.shields.io/travis/avp/spectra.svg?style=flat)](https://travis-ci.org/avp/spectra)
[![Coverage Status](http://img.shields.io/coveralls/avp/spectra.svg?style=flat)](https://coveralls.io/r/avp/spectra?branch=master)
[![devDependency Status](http://img.shields.io/david/dev/avp/spectra.svg?style=flat)](https://david-dm.org/avp/spectra#info=devDependencies)
[![npm Version](http://img.shields.io/npm/v/spectra.svg?style=flat)](http://npmjs.org/package/spectra)
![GA Beacon](https://ga-beacon.appspot.com/UA-46742689-1/avp/spectra?pixel)


A small Javascript library for quickly manipulating and converting colors.

Example
-------

Spectra can be wrapped around many different types of objects to create a Spectra color that can be manipulated.

```javascript
var color = Spectra({r: 255, g: 25, b: 75});
color.red() // 255
```

Motivation
----------

The project was created to have a highly functional and lightweight way to deal with colors using Javascript, without any dependencies.

Installation
------------

Simply download [spectra.min.js](https://github.com/avp/spectra/releases/) and include it before your source files.

### Bower

The bower package is at `spectrajs`.

    bower install spectrajs

### Node

This module also works with Node. Simply run `npm install spectra` and use `var Spectra = require('spectra')` to set it up.

API Reference
-------------

Refer to http://avp.github.io/spectra for reference on how to use Spectra.

Tests
-----

There are [Jasmine](https://pivotal.github.io/jasmine) tests included in the `tests` folder. Simply run `grunt test` from the root of the repository to run the tests. This also checks JSHint. Alternatively, run `grunt` to keep watch over source and test files, and automatically rerun the tests when the files change.

### Coverage

Test coverage information can be generated by running `grunt karma`. Coverage information will be located in `test/coverage` after generation.

Building
--------

To minify Spectra, run `grunt build`.

Contributing
------------

View [CONTRIBUTING.md](https://github.com/avp/spectra/blob/master/CONTRIBUTING.md) for guidelines on how to contribute.

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