pub fn error(msg: &str) -> String
Format an error message with red X.
Returns colored output if stdout is a TTY, plain text otherwise.