Module colorizer.parser.rgb
Helper function to parse argb
Functions
parser.rgb_function_parser (line, i, opts) | Parse for rgb() rgba() css function and return rgb hex. |
Functions
- parser.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:
- number|nil: Index of line where the rgb/rgba function ended
- string|nil: rgb hex value