# hsl

{% tabs %}
{% tab title="Function types" %}

```typescript
hsl(color: string): { 
    include: boolean, 
    matchs: RegExpMatchArray | null, 
    groups: Array<{ 
        hue: string | undefined,
        saturation: string | undefined,
        lightness: string | undefined
    } | null> | null
}
```

{% endtab %}

{% tab title="Code example" %}
**Search hsl color in a string:**

<pre class="language-javascript"><code class="lang-javascript"><strong>const { global } = require('regex-simplify');
</strong>
const color = global.hsl(`
    hsl(123, 45%, 67%)
`)

console.log(color);
</code></pre>

{% endtab %}

{% tab title="Function return" %}
**And here what return the function:**

```javascript
{
  include: true,
  matchs: [ 'hsl(123, 45%, 67%)' ],
  groups: [
    [Object: null prototype] {     
      hue: '123',
      saturation: '45%',
      lightness: '67%'
    }
  ]
}
```

{% endtab %}
{% endtabs %}
