diff options
author | akianonymus <anonymus.aki@gmail.com> | 2023-02-25 19:50:18 +0530 |
---|---|---|
committer | Akshay <anonymus.aki@gmail.com> | 2023-02-25 21:33:51 +0530 |
commit | afbcc17d1279180db28a58044dca39b6e909c6b9 (patch) | |
tree | b3591157065ea2c66bb80115c707a5d1c2696dbd /doc/modules/colorizer.color.html | |
parent | docs: fix unquoted string in README (diff) |
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
Diffstat (limited to 'doc/modules/colorizer.color.html')
-rw-r--r-- | doc/modules/colorizer.color.html | 48 |
1 files changed, 9 insertions, 39 deletions
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 @@ <td class="summary">Converts an HSL color value to RGB.</td> </tr> <tr> - <td class="name" nowrap><a href="#hsl_function_parser">hsl_function_parser (line, i)</a></td> - <td class="summary">Parse for hsl() css function and return rgb hex.</td> - </tr> - <tr> - <td class="name" nowrap><a href="#hsla_function_parser">hsla_function_parser (line, i)</a></td> - <td class="summary">Parse for hsl() css function and return rgb hex.</td> + <td class="name" nowrap><a href="#hsl_function_parser">hsl_function_parser (line, i, opts)</a></td> + <td class="summary">Parse for hsl() hsla() css function and return rgb hex.</td> </tr> <tr> <td class="name" nowrap><a href="#hue_to_rgb">hue_to_rgb (p, q, t)</a></td> @@ -174,10 +170,11 @@ </dd> <dt> <a name = "hsl_function_parser"></a> - <strong>hsl_function_parser (line, i)</strong> + <strong>hsl_function_parser (line, i, opts)</strong> </dt> <dd> - 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 <h3>Parameters:</h3> @@ -188,42 +185,15 @@ <li><span class="parameter">i</span> number: Index of line from where to start parsing </li> - </ul> - - <h3>Returns:</h3> - <ol> - <li> - number|nil: Index of line where the hsl function ended</li> - <li> - string|nil: rgb hex value</li> - </ol> - - - - -</dd> - <dt> - <a name = "hsla_function_parser"></a> - <strong>hsla_function_parser (line, i)</strong> - </dt> - <dd> - Parse for hsl() css function and return rgb hex. - - - <h3>Parameters:</h3> - <ul> - <li><span class="parameter">line</span> - string: Line to parse - </li> - <li><span class="parameter">i</span> - number: Index of line from where to start parsing + <li><span class="parameter">opts</span> + table: Values passed from matchers like prefix </li> </ul> <h3>Returns:</h3> <ol> <li> - number|nil: Index of line where the hsla function ended</li> + number|nil: Index of line where the hsla/hsl function ended</li> <li> string|nil: rgb hex value</li> </ol> @@ -424,7 +394,7 @@ </div> <!-- id="main" --> <div id="about"> <i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i> -<i style="float:right;">Last updated - September </i> +<i style="float:right;">Last updated - February </i> </div> <!-- id="about" --> </div> <!-- id="container" --> </body> |