Skip to content

Commit

Permalink
docs: update documentation with hsl and hsla
Browse files Browse the repository at this point in the history
  • Loading branch information
bsushmith committed Apr 30, 2024
1 parent a7ef1ab commit 0984645
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions styles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,23 @@ This function returns a string representation of the given RGBA color.
rgbaColor := styles.RGBA(255, 0, 0, 0.5) // Returns "rgba(255, 0, 0, 0.5)"
```

##### `HSL(h, s, l int) string`

This function returns a string representation of the given HSL color.

```go
hslColor := styles.HSL(120, 100, 50) // Returns "hsl(120, 100%, 50%)"
```

##### `HSLA(h, s, l int, a float64) string`

This function returns a string representation of the given HSLA color.

```go
hslaColor := styles.HSLA(120, 100, 50, 0.5) // Returns "hsla(120, 100%, 50%, 0.5)"
```


#### Other Functions

##### `Int(value int) string`
Expand Down

0 comments on commit 0984645

Please sign in to comment.