SassColor.hwb constructor

SassColor.hwb(
  1. num? hue,
  2. num? whiteness,
  3. num? blackness, [
  4. num? alpha = 1,
])

Creates a color in ColorSpace.hwb.

If null is passed for alpha, that indicates that it's a missing component. In most cases, this is equivalent to the color being transparent.

Throws a RangeError if alpha isn't between 0 and 1.

Implementation

factory SassColor.hwb(num? hue, num? whiteness, num? blackness,
        [num? alpha = 1]) =>
    SassColor.forSpaceInternal(ColorSpace.hwb, hue?.toDouble(),
        whiteness?.toDouble(), blackness?.toDouble(), alpha?.toDouble());