An open API service indexing awesome lists of open source software.

https://github.com/diegohaz/coolors-to-hex

Get hexadecimal values from a coolors url
https://github.com/diegohaz/coolors-to-hex

coolors coolors-url hex hexadecimal-values nodejs

Last synced: 4 months ago
JSON representation

Get hexadecimal values from a coolors url

Awesome Lists containing this project

README

        

# coolors-to-hex

[![Generated with nod](https://img.shields.io/badge/generator-nod-2196F3.svg?style=flat-square)](https://github.com/diegohaz/nod)
[![NPM version](https://img.shields.io/npm/v/coolors-to-hex.svg?style=flat-square)](https://npmjs.org/package/coolors-to-hex)
[![Build Status](https://img.shields.io/travis/diegohaz/coolors-to-hex/master.svg?style=flat-square)](https://travis-ci.org/diegohaz/coolors-to-hex) [![Coverage Status](https://img.shields.io/codecov/c/github/diegohaz/coolors-to-hex/master.svg?style=flat-square)](https://codecov.io/gh/diegohaz/coolors-to-hex/branch/master)

Get hexadecimal values from a coolors url

## Install

$ npm install --save coolors-to-hex

## Usage

```js
import coolorsToHex from 'coolors-to-hex'

coolorsToHex('https://coolors.co/d32f2f-f44336-f8877f-ffcdd2-ffffff')
// returns ['#d32f2f', '#f44336', '#f8877f', '#ffcdd2', '#ffffff']
```

## API

### coolorsToHex

Returns an array of hexadecimal string colors.

**Parameters**

- `url` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**

Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)>**

## License

MIT © [Diego Haz](https://github.com/diegohaz)