Skip to main content

parse_background

Function parse_background 

Source
pub fn parse_background(value: &str) -> Result<Option<String>, String>
Expand description

Turn a background color as a user writes it into one ffmpeg understands.

  • "", "transparent", "none" → None (keep transparency)
  • "#rgb", "#rrggbb", "rrggbb", "0xrrggbb" → Some("0xRRGGBB")
  • a color name such as "white" or "DarkSlateGray" → Some("darkslategray") (ffmpeg checks the name when rendering)