https://github.com/danielgtaylor/rhs-color
R.H.S. color conversion utilities
https://github.com/danielgtaylor/rhs-color
cli-app color converter gardening javascript-library
Last synced: about 1 year ago
JSON representation
R.H.S. color conversion utilities
- Host: GitHub
- URL: https://github.com/danielgtaylor/rhs-color
- Owner: danielgtaylor
- Created: 2017-04-11T05:30:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-11T05:35:57.000Z (over 9 years ago)
- Last Synced: 2024-10-05T22:02:01.305Z (almost 2 years ago)
- Topics: cli-app, color, converter, gardening, javascript-library
- Language: JavaScript
- Size: 12.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RHS Color Utilities
Convert between [R.H.S. Color Chart](http://www.rhsshop.co.uk/category.aspx?id=10000006) values, RGB screen approximations, and friendly color names.
Note that these are just approximations and accuracy depends on color calibration, gamma settings, and various other factors. Some colors with 0 or 255 for a color component may be impossible to display on a screen and have been clipped.
# Script Usage
First, `npm install rhs-color`. It will install a script on your path:
```sh
$ rhs-color 165A
165A => [75,40,29] #4b281d Moderate Brown
$ rhs-color '#4b281d'
4b281d => RHS 165A Moderate Brown (#4b281d)
```
# Library Usage
Example:
```js
import rhs from 'rhs-color';
console.log(rhs.hex('165A'));
console.log(rhs.rgb('165A'));
console.log(rhs.name('165A'));
console.log(rhs.ucl('165A'));
console.log(rhs.fromRgb('#4b281d'));
```
## License
https://dgt.mit-license.org/