pub fn new(
        hue: Rational,
        w: Rational,
        b: Rational,
        alpha: Rational,
    ) -> Hwba {
        let mut w = clamp(w, zero(), one());
        let mut b = clamp(b, zero(), one());
        let wbsum = w + b;
        if w + b > one() {
            w /= wbsum;
            b /= wbsum;
        }
        Hwba {
            hue,
            w,
            b,
            alpha: clamp(alpha, zero(), one()),
        }
    }
/// Create a new hwba color value.
///
/// Hue is modulo 360 degrees.  Other inputs will be clamped to
/// their ranges.
Create a new hwba color value.
Hue is modulo 360 degrees.  Other inputs will be clamped to
their ranges.
Create a new hwba color value . Hue is modulo 360 degrees . Other inputs will be clamped to their ranges .
pub fn new(
        hue: Rational,
        w: Rational,
        b: Rational,
        alpha: Rational,
    ) -> Hwba {
        let mut w = clamp(w, zero(), one());
        let mut b = clamp(b, zero(), one());
        let wbsum = w + b;
        if w + b > one() {
            w /= wbsum;
            b /= wbsum;
        }
        Hwba {
            hue,
            w,
            b,
            alpha: clamp(alpha, zero(), one()),
        }
    }
pub fn new ( hue : Rational , w : Rational , b : Rational , alpha : Rational , ) -> Hwba { let mut w = clamp ( w , zero ( ) , one ( ) ) ; let mut b = clamp ( b , zero ( ) , one ( ) ) ; let wbsum = w + b ; if w + b > one ( ) { w /= wbsum ; b /= wbsum ; } Hwba { hue , w , b , alpha : clamp ( alpha , zero ( ) , one ( ) ) , } }
Create a new hwba color value.
Create a new hwba color value .
hue
Rational
w
Rational
b
Rational
alpha
Rational