Function av_parse_color

pub unsafe extern "C" fn av_parse_color(
    rgba_color: *mut u8,
    color_string: *const i8,
    slen: i32,
    log_ctx: *mut c_void,
) -> i32
Expand description

Put the RGBA values that correspond to color_string in rgba_color.

@param rgba_color 4-elements array of uint8_t values, where the respective red, green, blue and alpha component values are written. @param color_string a string specifying a color. It can be the name of a color (case insensitive match) or a [0x|#]RRGGBB[AA] sequence, possibly followed by “@” and a string representing the alpha component. The alpha component may be a string composed by “0x” followed by an hexadecimal number or a decimal number between 0.0 and 1.0, which represents the opacity value (0x00/0.0 means completely transparent, 0xff/1.0 completely opaque). If the alpha component is not specified then 0xff is assumed. The string “random” will result in a random color. @param slen length of the initial part of color_string containing the color. It can be set to -1 if color_string is a null terminated string containing nothing else than the color. @param log_ctx a pointer to an arbitrary struct of which the first field is a pointer to an AVClass struct (used for av_log()). Can be NULL. @return >= 0 in case of success, a negative value in case of failure (for example if color_string cannot be parsed).