Module colorizer.parser.argb_hex
ARGB Hex Parser
This module provides a parser for extracting 0xAARRGGBB hexadecimal color values and converting them to RGB hex.
This format is commonly used in Android apps for color values, where the color includes an alpha (transparency) component. The function parses the color, applies the alpha value to each RGB channel, and returns the resulting RGB hex string.
Functions
| parser (line, i) | Parses a 0xAARRGGBB formatted hexadecimal color and converts it to an RGB hex value. |
Tables
| spec | Parser spec for the registry |
Functions
- parser (line, i)
-
Parses a
0xAARRGGBBformatted hexadecimal color and converts it to an RGB hex value. This function reads a color from a line of text, expecting it in the0xAARRGGBBformat (common in Android apps). It extracts the alpha (AA), red (RR), green (GG), and blue (BB) components, applies the alpha to the RGB channels, and outputs the resulting RGB color in hexadecimal format.