diff --git a/src/ImageProcessor/Colors/Hsv.cs b/src/ImageProcessor/Colors/Hsv.cs index e76d1657cd..d85dd35207 100644 --- a/src/ImageProcessor/Colors/Hsv.cs +++ b/src/ImageProcessor/Colors/Hsv.cs @@ -45,28 +45,27 @@ namespace ImageProcessor /// Gets the H hue component. /// A value ranging between 0 and 360. /// - public float H { get; } + public readonly float H; /// /// Gets the S saturation component. /// A value ranging between 0 and 100. /// - public float S { get; } - - + public readonly float S; + /// /// Gets the V value (brightness) component. /// A value ranging between 0 and 100. /// - public float V { get; } + public readonly float V; /// /// Gets a value indicating whether this is empty. /// [EditorBrowsable(EditorBrowsableState.Never)] public bool IsEmpty => Math.Abs(this.H) < Epsilon - && Math.Abs(this.S) < Epsilon - && Math.Abs(this.V) < Epsilon; + && Math.Abs(this.S) < Epsilon + && Math.Abs(this.V) < Epsilon; /// /// Compares two objects. The result specifies whether the values diff --git a/src/ImageProcessor/Colors/YCbCr.cs b/src/ImageProcessor/Colors/YCbCr.cs index 0c4a1b67bd..f7d7f05b22 100644 --- a/src/ImageProcessor/Colors/YCbCr.cs +++ b/src/ImageProcessor/Colors/YCbCr.cs @@ -49,27 +49,27 @@ namespace ImageProcessor /// Gets the Y luminance component. /// A value ranging between 0 and 255. /// - public float Y { get; } + public readonly float Y; /// /// Gets the Cb chroma component. /// A value ranging between 0 and 255. /// - public float Cb { get; } + public readonly float Cb; /// /// Gets the Cr chroma component. /// A value ranging between 0 and 255. /// - public float Cr { get; } + public readonly float Cr; /// /// Gets a value indicating whether this is empty. /// [EditorBrowsable(EditorBrowsableState.Never)] public bool IsEmpty => Math.Abs(this.Y) < Epsilon - && Math.Abs(this.Cb) < Epsilon - && Math.Abs(this.Cr) < Epsilon; + && Math.Abs(this.Cb) < Epsilon + && Math.Abs(this.Cr) < Epsilon; /// /// Compares two objects. The result specifies whether the values