setFillColorHsl method

void setFillColorHsl (
  1. int h,
  2. num s,
  3. num l,
  4. [num a = 1]
)

Sets the color used inside shapes. h is in degrees, 0-360. s, l are in percent, 0-100. a is 0-1.

Implementation

void setFillColorHsl(int h, num s, num l, [num a = 1]) {
  this.fillStyle = 'hsla($h, $s%, $l%, $a)';
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-html/CanvasRenderingContext2D/setFillColorHsl.html