HslColor.FromRgbColor Method
Converts an RGB color representation to an HSL color representation.
Namespace: Microsoft.VisualStudio.Modeling.Diagrams
Assembly: Microsoft.VisualStudio.Modeling.Sdk.11.0 (in Microsoft.VisualStudio.Modeling.Sdk.11.0.dll)
Syntax
'Declaration
Public Shared Function FromRgbColor ( _
color As Color _
) As HslColor
public static HslColor FromRgbColor(
Color color
)
public:
static HslColor^ FromRgbColor(
Color color
)
static member FromRgbColor :
color:Color -> HslColor
public static function FromRgbColor(
color : Color
) : HslColor
Parameters
color
Type: ColorRGB color to convert to HSL representation.
Return Value
Type: Microsoft.VisualStudio.Modeling.Diagrams.HslColor
Remarks
The algorithm implemented is from the following KnowledgeBase article: https://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b29240, and from "Computer Graphics: Principles and Practices" by Foley, vanDam, et.al., pp. 592-596.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.