Udostępnij za pośrednictwem


HslColor.FromRgbColor(Color) Method

Definition

Converts an RGB color representation to an HSL color representation. The algorithm implemented is from the following KnowledgeBase article: http://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.

public:
 static Microsoft::VisualStudio::Modeling::Diagrams::HslColor ^ FromRgbColor(System::Drawing::Color color);
public static Microsoft.VisualStudio.Modeling.Diagrams.HslColor FromRgbColor (System.Drawing.Color color);
static member FromRgbColor : System.Drawing.Color -> Microsoft.VisualStudio.Modeling.Diagrams.HslColor
Public Shared Function FromRgbColor (color As Color) As HslColor

Parameters

color
Color

RGB color to convert to HSL representation.

Returns

Returns newly converted HslColor value.

Applies to