Skip to content

Commit

Permalink
Fix the README to show the correct expected values
Browse files Browse the repository at this point in the history
`getHsl` and `getHsla` rotate the hue to the standard range [0, 360).
Essentially 360 is parsed and recalculated to 0 following the logic
[here](http://www.w3.org/TR/css3-color/#hsl-color).
  • Loading branch information
tusharpm authored and Qix- committed Jan 3, 2016
1 parent aed6980 commit 4565f55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ colorString.getRgb("blue") // [0, 0, 255]
colorString.getRgba("rgba(200, 60, 60, 0.3)") // [200, 60, 60, 0.3]
colorString.getRgba("rgb(200, 200, 200)") // [200, 200, 200, 1]

colorString.getHsl("hsl(360, 100%, 50%)") // [360, 100, 50]
colorString.getHsla("hsla(360, 60%, 50%, 0.4)") // [360, 60, 50, 0.4]
colorString.getHsl("hsl(360, 100%, 50%)") // [0, 100, 50]
colorString.getHsla("hsla(360, 60%, 50%, 0.4)") // [0, 60, 50, 0.4]

colorString.getAlpha("rgba(200, 0, 12, 0.6)") // 0.6
```
Expand Down

0 comments on commit 4565f55

Please sign in to comment.