Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
asamuzaK committed Jan 26, 2024
1 parent 7c7483e commit 58dc613
Showing 1 changed file with 30 additions and 27 deletions.
57 changes: 30 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import { convert, parse, resolve } from '@asamuzakjp/css-color';

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

## resolve
### resolve

resolve CSS color

### Parameters
#### Parameters

* `color` **[string][93]** color value
* [&lt;system-color&gt;](https://developer.mozilla.org/en-US/docs/Web/CSS/system-color)s are not supported
Expand All @@ -38,11 +38,11 @@ Returns **([string][93]? | [Array][96])** `rgba?()`, `[r, g, b, a]`, `#rrggbb(aa
* in `hex`, `transparent` resolves as `null`


## parse
### parse

parse CSS color

### Parameters
#### Parameters

* `value` **[string][93]** color value
* `color-mix()` and [&lt;system-color&gt;](https://developer.mozilla.org/en-US/docs/Web/CSS/system-color)s are not supported
Expand All @@ -52,131 +52,134 @@ parse CSS color
Returns **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1


## convert
### convert

container for conversion functions


## convert.xyzToHex
### convert.xyzToHex

convert xyz to hex color

### Parameters
#### Parameters

* `xyz` **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[string][93]** `#rrggbbaa`


## convert.xyzToHsl
### convert.xyzToHsl

convert xyz to hsl

### Parameters
#### Parameters

* `xyz` **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[Array][96]<[number][97]>** `[h, s, l, a]` h: 0..360 s|l: 0..100 a: 0..1


## convert.xyzToHwb
### convert.xyzToHwb

convert xyz to hwb

### Parameters
#### Parameters

* `xyz` **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[Array][96]<[number][97]>** `[h, w, b, a]` h: 0..360 w|b: 0..100 a: 0..1


## convert.xyzToOklab
### convert.xyzToOklab

convert xyz to oklab

### Parameters
#### Parameters

* `xyz` **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[Array][96]<[number][97]>** `[l, a, b, A]` l|A: 0..1 a|b: -0.4..0.4


## convert.xyzToOklch
### convert.xyzToOklch

convert xyz to oklch

### Parameters
#### Parameters

* `xyz` **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[Array][96]<[number][97]>** `[l, c, h, a]` l|a: 0..1 c: 0..0.4 h: 0..360


## convert.xyzToRgb
### convert.xyzToRgb

convert xyz to rgb

### Parameters
#### Parameters

* `xyz` **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[Array][96]<[number][97]>** `[r, g, b, a]` r|g|b: 0..255 a: 0..1


## convert.xyzToXyzD50
### convert.xyzToXyzD50

convert xyz to xyz-d50

### Parameters
#### Parameters

* `xyz` **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[Array][96]<[number][97]>** xyz - `[x, y, z, a]` x|y|z|a: 0..1


## convert.xyzD50ToHex
### convert.xyzD50ToHex

convert xyz D50 to hex color

### Parameters
#### Parameters

* `xyz` **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[string][93]** #rrggbbaa


## convert.xyzD50ToLab
### convert.xyzD50ToLab

convert xyz-d50 to lab

### Parameters
#### Parameters

* `xyz` **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[Array][96]<[number][97]>** `[l, a, b, A]` l: 0..100 a|b: -125..125 A: 0..1


## convert.xyzD50ToLch
### convert.xyzD50ToLch

convert xyz-d50 to lch

### Parameters
#### Parameters

* `xyz` **[Array][96]<[number][97]>** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[Array][96]<[number][97]>** `[l, c, h, a]` l: 0..100 c: 0..150 h: 0..360 a: 0..1


## convert.xyzD50ToRgb
### convert.xyzD50ToRgb

convert xyz D50 to rgb

### Parameters
#### Parameters

* `xyz` **[Array][96]** `[x, y, z, a]` x|y|z|a: 0..1

Returns **[Array][96]<[number][97]>** `[r, g, b, a]` r|g|b: 0..255 a: 0..1

---
Copyright (c) 2024 [asamuzaK (Kazz)](https://github.com/asamuzaK/)

[93]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[94]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[95]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
Expand Down

0 comments on commit 58dc613

Please sign in to comment.