From dde3084106a70b9a79d48f426f6d6fec6fd203f7 Mon Sep 17 00:00:00 2001 From: akianonymus Date: Mon, 27 Feb 2023 14:30:10 +0530 Subject: Separate parsers into individual files --- doc/modules/colorizer.color.html | 187 ++------------------------------------- 1 file changed, 6 insertions(+), 181 deletions(-) (limited to 'doc/modules/colorizer.color.html') diff --git a/doc/modules/colorizer.color.html b/doc/modules/colorizer.color.html index 5947611..37a92cd 100644 --- a/doc/modules/colorizer.color.html +++ b/doc/modules/colorizer.color.html @@ -42,6 +42,11 @@
  • buffer
  • color
  • matcher
  • +
  • parser.argb_hex
  • +
  • parser.hsl
  • +
  • parser.names
  • +
  • parser.rgb
  • +
  • parser.rgba_hex
  • sass
  • tailwind
  • trie
  • @@ -53,7 +58,7 @@

    Module colorizer.color

    -

    Helper functions to parse different colour formats

    +

    Helper color functions

    @@ -61,19 +66,11 @@

    Functions

    - - - - - - - - @@ -81,18 +78,6 @@ - - - - - - - - - - - -
    argb_hex_parser (line, i)parse for 0xaarrggbb and return rgb hex.
    hsl_to_rgb (h, s, l) Converts an HSL color value to RGB.
    hsl_function_parser (line, i, opts)Parse for hsl() hsla() css function and return rgb hex.
    hue_to_rgb (p, q, t) Convert hsl colour values to rgb.
    is_bright (r, g, b) Determine whether to use black or white text.
    name_parser (line, i, opts)Grab all the colour values from vim.api.nvim_get_color_map and create a lookup table.
    rgb_function_parser (line, i, opts)Parse for rgb() rgba() css function and return rgb hex.
    rgba_hex_parser (line, i, opts)parse for #rrggbbaa and return rgb hex.

    @@ -102,37 +87,6 @@

    Functions

    -
    - - argb_hex_parser (line, i) -
    -
    - parse for 0xaarrggbb and return rgb hex. - a format used in android apps - - -

    Parameters:

    -
      -
    • line - string: line to parse -
    • -
    • i - number: index of line from where to start parsing -
    • -
    - -

    Returns:

    -
      -
    1. - number|nil: index of line where the hex value ended
    2. -
    3. - string|nil: rgb hex value
    4. -
    - - - - -
    hsl_to_rgb (h, s, l) @@ -163,40 +117,6 @@ - -
    - - hsl_function_parser (line, i, opts) -
    -
    - 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:

    -
      -
    • line - string: Line to parse -
    • -
    • i - number: Index of line from where to start parsing -
    • -
    • opts - table: Values passed from matchers like prefix -
    • -
    - -

    Returns:

    -
      -
    1. - number|nil: Index of line where the hsla/hsl function ended
    2. -
    3. - string|nil: rgb hex value
    4. -
    - - - -
    @@ -258,101 +178,6 @@ - -
    - - name_parser (line, i, opts) -
    -
    - Grab all the colour values from vim.api.nvim_get_color_map and create a lookup table. - COLOR_MAP is used to store the colour values - - -

    Parameters:

    -
      -
    • line - string: Line to parse -
    • -
    • i - number: Index of line from where to start parsing -
    • -
    • opts - table: Currently contains whether tailwind is enabled or not -
    • -
    - - - - - -
    -
    - - rgb_function_parser (line, i, opts) -
    -
    - Parse for rgb() rgba() css function and return rgb hex. - For more info: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb - - -

    Parameters:

    -
      -
    • line - string: Line to parse -
    • -
    • i - number: Index of line from where to start parsing -
    • -
    • opts - table: Values passed from matchers like prefix -
    • -
    - -

    Returns:

    -
      -
    1. - number|nil: Index of line where the rgb/rgba function ended
    2. -
    3. - string|nil: rgb hex value
    4. -
    - - - - -
    -
    - - rgba_hex_parser (line, i, opts) -
    -
    - parse for #rrggbbaa and return rgb hex. - a format used in android apps - - -

    Parameters:

    -
      -
    • line - string: line to parse -
    • -
    • i - number: index of line from where to start parsing -
    • -
    • opts - table: Containing minlen, maxlen, valid_lengths -
    • -
    - -

    Returns:

    -
      -
    1. - number|nil: index of line where the hex value ended
    2. -
    3. - string|nil: rgb hex value
    4. -
    - - - -
    -- cgit v1.2.3-70-g09d2