Socket
Socket
Sign inDemoInstall

spectra

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    spectra

Javascript color manipulation library.


Version published
Weekly downloads
269
decreased by-25.69%
Maintainers
1
Install size
36.8 kB
Created
Weekly downloads
 

Readme

Source

Spectra

Build Status Coverage Status devDependency Status npm Version GA Beacon

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.

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 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 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 for guidelines on how to contribute.

FAQs

Last updated on 30 Jul 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc