Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

Commit 85eb89d

Browse files
committed
Updated documentation
1 parent aa36702 commit 85eb89d

File tree

7 files changed

+193
-114
lines changed

7 files changed

+193
-114
lines changed

Documentation/Conversions.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
# Supported Conversions
3+
4+
<br>
5+
6+
## Output
7+
8+
*The RGB(A) output is within the following ranges.*
9+
10+
<br>
11+
12+
| Red | Green | Blue | Alpha |
13+
|:---:|:------|:----:|:-----:|
14+
| `0 - 255` | `0 - 255` | `0 - 255` | `0 - 255`
15+
16+
<br>
17+
<br>
18+
19+
## Hex ( + Alpha )
20+
21+
All channels are integers in the range of  `0 - FF`
22+
23+
<br>
24+
25+
| | Hex | Hex (Alpha) |
26+
|:-:|:---:|:-----------:|
27+
| **Single** | `#RGB` | `#RGBA`
28+
| **Double** | `#RRGGBB` | `#RRGGBBAA`
29+
30+
*`#`  is optional.*
31+
32+
<br>
33+
<br>
34+
35+
## HSL ( A )
36+
37+
Hue ranges from  `0 - 360` , all others range from  `0 - 255`
38+
39+
<br>
40+
41+
| | HSL | HSLA |
42+
|:-:|:---:|:----:|
43+
| **Array** | ( [ H , S , L ] ) | ( [ H , S , L , A ] )
44+
| **Parameter** | ( H , S , L ) | ( H , S , L , A )
45+
46+
<br>

Documentation/Install.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

Documentation/Sources/HSL.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
2+
# HSL
3+
4+
*Convert HSL colors to RGB.*
5+
6+
```JavaScript
7+
import { fromHSL } from 'RGB'
8+
```
9+
10+
<br>
11+
12+
## Parameter
13+
14+
*Supply the channels directly.*
15+
16+
```JavaScript
17+
const rgb = fromHSL( H , S , L );
18+
```
19+
20+
<br>
21+
22+
## Array
23+
24+
*Pass the channels as an array.*
25+
26+
```JavaScript
27+
const rgb = fromHSL([ H , S , L ]);
28+
```
29+
30+
<br>
31+
32+
## Alpha
33+
34+
*Optionally include an Alpha channel.*
35+
36+
```JavaScript
37+
const rgba = fromHSL([ H , S , L , A ]);
38+
```
39+
40+
```JavaScript
41+
const rgba = fromHSL( H , S , L , A );
42+
```
43+
44+
<br>

Documentation/Sources/Hex.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
# Hex
3+
4+
*Convert Hex color strings to HSL.*
5+
6+
```JavaScript
7+
import { fromHex } from 'HSL'
8+
```
9+
10+
<br>
11+
12+
## Single & Double
13+
14+
*Use either format to specify the RGB parts.*
15+
16+
```JavaScript
17+
const hsl = fromHex('RGB');
18+
```
19+
20+
```JavaScript
21+
const hsl = fromHex('RRGGBB');
22+
```
23+
24+
<br>
25+
26+
## Hashtag
27+
28+
*Optionally place the  `#`  before it.*
29+
30+
```JavaScript
31+
const hsl = fromHex('#RRGGBB');
32+
```
33+
34+
<br>
35+
36+
## Alpha
37+
38+
*Optionally include an Alpha channel.*
39+
40+
```JavaScript
41+
const hsla = fromHex('RGBA');
42+
```
43+
44+
```JavaScript
45+
const hsla = fromHex('RRGGBBAA');
46+
```
47+
48+
<br>

Documentation/Supported.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

Documentation/Usage.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
2+
<br>
3+
4+
<div align = center>
5+
6+
# Usage
7+
8+
*How to use this module.*
9+
10+
<br>
11+
<br>
12+
13+
[![Button Hex]][Hex]   
14+
[![Button HSL]][HSL]
15+
16+
</div>
17+
18+
<br>
19+
<br>
20+
21+
## Import
22+
23+
<br>
24+
25+
```JavaScript
26+
import * as RGB from 'https://deno.land/x/rgb/mod.ts'
27+
```
28+
29+
<br>
30+
31+
### ImportMap
32+
33+
*Add the module to your **ImportMap** for easier importing.*
34+
35+
```JSON
36+
{
37+
"imports" : {
38+
"RGB" : "https://deno.land/x/rgb/mod.ts"
39+
}
40+
}
41+
```
42+
43+
<br>
44+
45+
46+
<!----------------------------------------------------------------------------->
47+
48+
[Hex]: Sources/Hex.md
49+
[HSL]: Sources/HSL.md
50+
51+
52+
<!---------------------------------[ Buttons ]--------------------------------->
53+
54+
[Button HSL]: https://img.shields.io/badge/HSL-37814A?style=for-the-badge
55+
[Button Hex]: https://img.shields.io/badge/Hex-EF2D5E?style=for-the-badge

Documentation/Use.md

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)