# GrapeCity.Documents.Drawing.HslColor.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Drawing_HslColor__ctor_" data-uid="GrapeCity.Documents.Drawing.HslColor.#ctor*">HslColor Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Drawing_HslColor__ctor_" data-uid="GrapeCity.Documents.Drawing.HslColor.#ctor*"></a>
<h4 id="GrapeCity_Documents_Drawing_HslColor__ctor_System_Drawing_Color_" data-uid="GrapeCity.Documents.Drawing.HslColor.#ctor(System.Drawing.Color)">HslColor(Color)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Documents.Drawing.HslColor.html">HslColor</a> struct from a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a> value.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public HslColor(Color color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(color As Color)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_HslColor__ctor_" data-uid="GrapeCity.Documents.Drawing.HslColor.#ctor*"></a>
<h4 id="GrapeCity_Documents_Drawing_HslColor__ctor_System_Single_System_Single_System_Single_System_Single_" data-uid="GrapeCity.Documents.Drawing.HslColor.#ctor(System.Single,System.Single,System.Single,System.Single)">HslColor(float, float, float, float)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Documents.Drawing.HslColor.html">HslColor</a> struct.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public HslColor(float hue, float saturation, float lightness, float opacity = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(hue As Single, saturation As Single, lightness As Single, Optional opacity As Single = 1)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">hue</span></td>
      <td><p>Hue value in the range [0, 360].</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">saturation</span></td>
      <td><p>Saturation value in the range [0, 1].</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">lightness</span></td>
      <td><p>Lightness value in the range [0, 1].</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">opacity</span></td>
      <td><p>Opacity value in the range [0, 1].</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_HslColor__ctor_" data-uid="GrapeCity.Documents.Drawing.HslColor.#ctor*"></a>
<h4 id="GrapeCity_Documents_Drawing_HslColor__ctor_System_Int32_" data-uid="GrapeCity.Documents.Drawing.HslColor.#ctor(System.Int32)">HslColor(int)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="GrapeCity.Documents.Drawing.HslColor.html">HslColor</a> struct from a 32-bit ARGB value.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public HslColor(int argb)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(argb As Integer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">argb</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
