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
- Host: GitHub
- URL: https://github.com/diegohaz/coolors-to-hex
- Owner: diegohaz
- License: mit
- Created: 2017-01-15T04:10:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-15T02:38:34.000Z (over 7 years ago)
- Last Synced: 2024-10-03T07:54:13.412Z (5 months ago)
- Topics: coolors, coolors-url, hex, hexadecimal-values, nodejs
- Language: JavaScript
- Size: 71.3 KB
- Stars: 18
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - diegohaz/coolors-to-hex - Get hexadecimal values from a coolors url (JavaScript)
README
# coolors-to-hex
[](https://github.com/diegohaz/nod)
[](https://npmjs.org/package/coolors-to-hex)
[](https://travis-ci.org/diegohaz/coolors-to-hex) [](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)