|
|
|
@ -15,7 +15,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(CieLab color) |
|
|
|
public HunterLab ToHunterLab(in CieLab color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -26,7 +26,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(CieLch color) |
|
|
|
public HunterLab ToHunterLab(in CieLch color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -37,7 +37,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(CieLchuv color) |
|
|
|
public HunterLab ToHunterLab(in CieLchuv color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -48,7 +48,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(CieLuv color) |
|
|
|
public HunterLab ToHunterLab(in CieLuv color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -59,7 +59,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(CieXyy color) |
|
|
|
public HunterLab ToHunterLab(in CieXyy color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -70,7 +70,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(CieXyz color) |
|
|
|
public HunterLab ToHunterLab(in CieXyz color) |
|
|
|
{ |
|
|
|
// Adaptation
|
|
|
|
CieXyz adapted = !this.WhitePoint.Equals(this.TargetHunterLabWhitePoint) && this.IsChromaticAdaptationPerformed |
|
|
|
@ -86,7 +86,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(Cmyk color) |
|
|
|
public HunterLab ToHunterLab(in Cmyk color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -97,7 +97,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(Hsl color) |
|
|
|
public HunterLab ToHunterLab(in Hsl color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -108,7 +108,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(Hsv color) |
|
|
|
public HunterLab ToHunterLab(in Hsv color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -119,7 +119,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(LinearRgb color) |
|
|
|
public HunterLab ToHunterLab(in LinearRgb color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -130,7 +130,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(Lms color) |
|
|
|
public HunterLab ToHunterLab(in Lms color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -141,7 +141,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(Rgb color) |
|
|
|
public HunterLab ToHunterLab(in Rgb color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
@ -152,7 +152,7 @@ namespace SixLabors.ImageSharp.ColorSpaces.Conversion |
|
|
|
/// </summary>
|
|
|
|
/// <param name="color">The color to convert.</param>
|
|
|
|
/// <returns>The <see cref="HunterLab"/></returns>
|
|
|
|
public HunterLab ToHunterLab(YCbCr color) |
|
|
|
public HunterLab ToHunterLab(in YCbCr color) |
|
|
|
{ |
|
|
|
var xyzColor = this.ToCieXyz(color); |
|
|
|
return this.ToHunterLab(xyzColor); |
|
|
|
|