Module colorizer.parser.hsl

HSL Parser This module provides a parser for identifying and converting hsl() and hsla() CSS functions to RGB hexadecimal format.

It supports various CSS color value formats, including degrees (deg), turns (turn), percentages, and alpha transparency. This function is useful for syntax highlighting or color recognition in a text editor.

Functions

parser (line, i, opts) Parses hsl() and hsla() CSS functions and converts them to RGB hexadecimal format.

Tables

spec Parser spec for the registry


Functions

parser (line, i, opts)
Parses hsl() and hsla() CSS functions and converts them to RGB hexadecimal format. This function matches hsl() or hsla() functions within a line of text, extracting and converting the hue, saturation, and luminance to an RGB color. It handles angles in degrees and turns, percentages, and an optional alpha (transparency) value.

Tables

spec
Parser spec for the registry
generated by LDoc 1.5.0 Last updated 2026-03-27 11:23:16