Skip to content

Instantly share code, notes, and snippets.

@bibohlog
bibohlog / GetColorFromHSB.cs
Created November 12, 2017 06:16
Get System.Windows.Media.Color from Hue / Saturation / Brightness of double values without "if" statements
/// <summary>
/// Get System.Windows.Media.Color from Hue / Saturation / Brightness of double values without "if" statements
/// </summary>
/// <param name="Hue">Hue in 0 to 360</param>
/// <param name="Saturation">Saturation in 0 to 100</param>
/// <param name="Brightness">Brightness(Value) in 0 to 100</param>
/// <returns>Color</returns>
Color GetColorFromHSB_(double Hue, double Saturation, double Brightness)
{
@bibohlog
bibohlog / GetColorFromHSB_simple.cs
Created November 12, 2017 06:19
HSBからRGBへ変換する (コピペ用)
/// <summary>
/// Get System.Windows.Media.Color from Hue / Saturation / Brightness of double values without "if" statements
/// </summary>
/// <param name="Hue">Hue in 0 to 360</param>
/// <param name="Saturation">Saturation in 0 to 100</param>
/// <param name="Brightness">Brightness(Value) in 0 to 100</param>
/// <returns>Color</returns>
Color GetColorFromHSB_(double Hue, double Saturation, double Brightness)
{