Skip to content

Commit 430e478

Browse files
committed
Added support for colors on the formats rgb[a](), hsl[a](), hwb().
1 parent a98cef7 commit 430e478

File tree

4 files changed

+562
-43
lines changed

4 files changed

+562
-43
lines changed

lib/canvasContext.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,17 @@ function CanvasContext(canvas) {
5050
* Specifies the fill color that is used when the fill method is called. Allowed values are:
5151
* - 32 bit integers on the format 0xRRGGBBAA
5252
* - strings on the format #RGB
53+
* - strings on the format #RGBA
5354
* - strings on the format #RRGGBB
5455
* - strings on the format #RRGGBBAA
56+
* - strings on the format rgb(255, 255, 255)
57+
* - strings on the format rgb(255, 255, 255, 0.5)
58+
* - strings on the format rgba(255, 255, 255, 0.5)
59+
* - strings on the format hsl(134, 50%, 50%)
60+
* - strings on the format hsl(134, 50%, 50%, 0.5)
61+
* - strings on the format hsla(134, 50%, 50%, 0.5)
62+
* - strings on the format hwb(134, 50%, 50%)
63+
* - strings on the format hwb(134, 50%, 50%, 0.5)
5564
* @public
5665
*/
5766
CanvasContext.prototype.fillStyle = 0x000000ff;

0 commit comments

Comments
 (0)