/// <summary> /// Initializes a new instance of the <see cref="ColorF"/> class using values from another instance. /// </summary> /// <param name="color">A <see cref="ColorF"/> instance.</param> public ColorF(ColorF color) { _red = color.Red; _green = color.Green; _blue = color.Blue; _alpha = color.Alpha; }
/// <summary> /// Initializes a new instance of the <see cref="ColorF"/> class from a blend of two colors. /// </summary> /// <param name="source">The blend source color.</param> /// <param name="dest">The blend destination color.</param> /// <param name="opacity">The opacity value.</param> public ColorF(ColorF source, ColorF dest, float opacity) { _red = MathFunctions.LinearInterpolation(source.Red, dest.Red, opacity); _green = MathFunctions.LinearInterpolation(source.Green, dest.Green, opacity); _blue = MathFunctions.LinearInterpolation(source.Blue, dest.Blue, opacity); }