mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-13 10:08:31 +00:00
Added missing doc-comments
This commit is contained in:
parent
0895627ccf
commit
558eb3eb5a
@ -6,12 +6,35 @@ namespace RGB.NET.Core
|
|||||||
{
|
{
|
||||||
#region Getter
|
#region Getter
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hue component value (HSV-color space) of this <see cref="Color"/> as degree in the range [0..360].
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="color"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public static double GetHue(this Color color) => color.GetHSV().hue;
|
public static double GetHue(this Color color) => color.GetHSV().hue;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the saturation component value (HSV-color space) of this <see cref="Color"/> in the range [0..1].
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="color"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public static double GetSaturation(this Color color) => color.GetHSV().saturation;
|
public static double GetSaturation(this Color color) => color.GetHSV().saturation;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the value component value (HSV-color space) of this <see cref="Color"/> in the range [0..1].
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="color"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public static double GetValue(this Color color) => color.GetHSV().value;
|
public static double GetValue(this Color color) => color.GetHSV().value;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the hue, saturation and value component values (HSV-color space) of this <see cref="Color"/>.
|
||||||
|
/// Hue as degree in the range [0..1].
|
||||||
|
/// Saturation in the range [0..1].
|
||||||
|
/// Value in the range [0..1].
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="color"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public static (double hue, double saturation, double value) GetHSV(this Color color)
|
public static (double hue, double saturation, double value) GetHSV(this Color color)
|
||||||
=> CaclulateHSVFromRGB(color.RPercent, color.GPercent, color.BPercent);
|
=> CaclulateHSVFromRGB(color.RPercent, color.GPercent, color.BPercent);
|
||||||
|
|
||||||
|
|||||||
@ -6,8 +6,13 @@ namespace RGB.NET.Core
|
|||||||
{
|
{
|
||||||
#region Getter
|
#region Getter
|
||||||
|
|
||||||
public static (double r, double g, double b) GetRGBPercent(this Color color)
|
/// <summary>
|
||||||
=> (color.RPercent, color.GPercent, color.BPercent);
|
/// Gets the A, R, G and B component value of this <see cref="Color"/> as percentage in the range [0..1].
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="color"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static (double a, double r, double g, double b) GetRGBPercent(this Color color)
|
||||||
|
=> (color.APercent, color.RPercent, color.GPercent, color.BPercent);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user