From afbcc17d1279180db28a58044dca39b6e909c6b9 Mon Sep 17 00:00:00 2001 From: akianonymus Date: Sat, 25 Feb 2023 19:50:18 +0530 Subject: feat: Improve hsl parser follow https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl add support for deg, turn and all alpha values merge hsl and hsla into one parser less regex computation --- doc/modules/colorizer.color.html | 48 ++++++++-------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) (limited to 'doc/modules/colorizer.color.html') diff --git a/doc/modules/colorizer.color.html b/doc/modules/colorizer.color.html index 74d4e55..751214c 100644 --- a/doc/modules/colorizer.color.html +++ b/doc/modules/colorizer.color.html @@ -70,12 +70,8 @@ Converts an HSL color value to RGB. - hsl_function_parser (line, i) - Parse for hsl() css function and return rgb hex. - - - hsla_function_parser (line, i) - Parse for hsl() css function and return rgb hex. + hsl_function_parser (line, i, opts) + Parse for hsl() hsla() css function and return rgb hex. hue_to_rgb (p, q, t) @@ -174,10 +170,11 @@
- hsl_function_parser (line, i) + hsl_function_parser (line, i, opts)
- Parse for hsl() css function and return rgb hex. + Parse for hsl() hsla() css function and return rgb hex. + For more info: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl

Parameters:

@@ -188,42 +185,15 @@
  • i number: Index of line from where to start parsing
  • - - -

    Returns:

    -
      -
    1. - number|nil: Index of line where the hsl function ended
    2. -
    3. - string|nil: rgb hex value
    4. -
    - - - - -
    -
    - - hsla_function_parser (line, i) -
    -
    - Parse for hsl() css function and return rgb hex. - - -

    Parameters:

    -

    Returns:

    1. - number|nil: Index of line where the hsla function ended
    2. + number|nil: Index of line where the hsla/hsl function ended
    3. string|nil: rgb hex value
    @@ -424,7 +394,7 @@
    generated by LDoc 1.4.6 -Last updated - September +Last updated - February
    -- cgit v1.2.3-70-g09d2