Module colorizer.parser.rgba_hex

RGBA Hex Parser This module provides a parser for identifying and converting #RRGGBBAA hexadecimal color values to RGB hexadecimal format.

It is commonly used in Android apps for colors with an alpha (transparency) component. The function reads the color, applies the alpha to each RGB channel, and returns the resulting RGB hex string.

Functions

parser (line, i, opts) Parses #RRGGBBAA hexadecimal colors and converts them to RGB hex format.

Tables

spec Parser spec for the registry


Functions

parser (line, i, opts)
Parses #RRGGBBAA hexadecimal colors and converts them to RGB hex format. This function matches #RRGGBBAA format colors within a line, handling alpha transparency if specified. It checks the length of the color string to match expected valid lengths (e.g., 4, 7, 9 characters).

Tables

spec
Parser spec for the registry
generated by LDoc 1.5.0 Last updated 2026-03-07 17:46:06