1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-13 01:58:30 +00:00

Added missing doc-comments

This commit is contained in:
Darth Affe 2019-02-24 18:00:12 +01:00
parent 0895627ccf
commit 558eb3eb5a
2 changed files with 30 additions and 2 deletions

View File

@ -6,12 +6,35 @@ namespace RGB.NET.Core
{
#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;
/// <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;
/// <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;
/// <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)
=> CaclulateHSVFromRGB(color.RPercent, color.GPercent, color.BPercent);

View File

@ -6,8 +6,13 @@ namespace RGB.NET.Core
{
#region Getter
public static (double r, double g, double b) GetRGBPercent(this Color color)
=> (color.RPercent, color.GPercent, color.BPercent);
/// <summary>
/// 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