Skip to content

Commit

Permalink
docs(readme) update the JS example
Browse files Browse the repository at this point in the history
closes #177
  • Loading branch information
meodai committed Jan 10, 2024
1 parent e0ebffd commit 7db6cbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Since there are 16777216 possible RGB colors, you might use a library such as

```js
import nearestColor from 'nearest-color';
import colorNameList from 'color-name-list';
import { colorNameList } from 'color-name-list';

// nearestColor need objects {name => hex} as input
const colors = colorNameList.reduce((o, { name, hex }) => Object.assign(o, { [name]: hex }), {});
Expand Down

0 comments on commit 7db6cbc

Please sign in to comment.