/// <summary> /// Converts a <see cref="YCbCr"/> into a <see cref="Rgb"/> /// </summary> /// <param name="color">The color to convert.</param> /// <returns>The <see cref="Rgb"/></returns> public Rgb ToRgb(YCbCr color) { // Conversion Rgb rgb = YCbCrAndRgbConverter.Convert(color); // Adaptation return(this.Adapt(rgb)); }
/// <summary> /// Converts a <see cref="YCbCr"/> into a <see cref="Rgb"/> /// </summary> /// <param name="color">The color to convert.</param> /// <returns>The <see cref="Rgb"/></returns> public Rgb ToRgb(YCbCr color) { Guard.NotNull(color, nameof(color)); // Conversion Rgb rgb = YCbCrAndRgbConverter.Convert(color); // Adaptation return(this.Adapt(rgb)); }
/// <summary> /// Converts a <see cref="YCbCr"/> into a <see cref="Rgb"/> /// </summary> /// <param name="color">The color to convert.</param> /// <returns>The <see cref="Rgb"/></returns> public Rgb ToRgb(YCbCr color) { Guard.NotNull(color, nameof(color)); // Conversion Rgb rgb = YCbCrAndRgbConverter.Convert(color); // Adaptation // TODO: Check this! return(rgb.WorkingSpace.Equals(this.TargetRgbWorkingSpace) ? rgb : this.Adapt(rgb)); }