color-name-list 10.28.1 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ npm test && npm run build
package/README.md CHANGED
@@ -135,12 +135,12 @@ consider using the [public rest API](#api-)
135
135
  #### Exact Color
136
136
 
137
137
  ```javascript
138
- import { colorNameList } from 'color-name-list';
138
+ import { colornames } from 'color-name-list';
139
139
 
140
- let someColor = colorNameList.find(color => color.hex === '#ffffff');
140
+ let someColor = colornames.find(color => color.hex === '#ffffff');
141
141
  console.log(someColor.name); // => white
142
142
 
143
- let someNamedColor = colorNameList.find(color => color.name === 'Eigengrau')
143
+ let someNamedColor = colornames.find(color => color.name === 'Eigengrau')
144
144
  console.log(someColor.hex); // => #16161d
145
145
  ```
146
146
 
@@ -151,10 +151,10 @@ Since there are 16777216 possible RGB colors, you might use a library such as
151
151
 
152
152
  ```js
153
153
  import nearestColor from 'nearest-color';
154
- import { colorNameList } from 'color-name-list';
154
+ import { colornames } from 'color-name-list';
155
155
 
156
156
  // nearestColor need objects {name => hex} as input
157
- const colors = colorNameList.reduce((o, { name, hex }) => Object.assign(o, { [name]: hex }), {});
157
+ const colors = colornames.reduce((o, { name, hex }) => Object.assign(o, { [name]: hex }), {});
158
158
 
159
159
  const nearest = nearestColor.from(colors);
160
160