Skip to content

Commit

Permalink
doc: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 10, 2022
1 parent 5c01abf commit 900be74
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ const named = [ const hexs = [
]; ];
```

```js
import hexs from "colors-named-hex";
import named from "colors-named";

hexs[named.indexOf('aliceblue')] // => #F0F8FF
hexs[named.indexOf('red')] // => #FF0000
hexs[named.indexOf('black')] // => #000000
```

## API

```ts
Expand All @@ -69,6 +78,7 @@ export default names;
## Related

- [`colors-named-hex`](https://jaywcjlove.github.io/colors-named-hex) A array with color name -> Hex rgb.
- [`colors-named-decimal`](https://github.com/jaywcjlove/colors-named-decimal) A array with color name -> decimal rgb.

## Contributors

Expand Down

0 comments on commit 900be74

Please sign in to comment.