changeHwb method

  1. @Deprecated('Use changeChannels() instead.')
SassColor changeHwb({
  1. num? hue,
  2. num? whiteness,
  3. num? blackness,
  4. num? alpha,
})

Changes one or more of this color's HWB channels and returns the result.

Implementation

@Deprecated('Use changeChannels() instead.')
SassColor changeHwb({num? hue, num? whiteness, num? blackness, num? alpha}) {
  if (!isLegacy) {
    throw SassScriptException(
        "color.changeHsl() is only supported for legacy colors. Please use "
        "color.changeChannels() instead with an explicit \$space argument.");
  }

  return SassColor.hwb(
          hue?.toDouble() ?? this.hue,
          whiteness?.toDouble() ?? this.whiteness,
          blackness?.toDouble() ?? this.blackness,
          alpha?.toDouble() ?? this.alpha + 0.0)
      .toSpace(space);
}