Share via


HslColor.FromRgbColor Method

Converts an RGB color representation to an HSL color representation.

Namespace:  Microsoft.VisualStudio.Modeling.Diagrams
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (in Microsoft.VisualStudio.Modeling.Sdk.12.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

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

See Also

Reference

HslColor Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace