pub fn add(
profiles: &mut Vec<BrowserProfile>,
name: &str,
color: Option<&str>,
now_ms: i64,
) -> Result<BrowserProfile, String>Expand description
A new profile added to profiles: a fresh id, a checked name, and the
given colour or the shared palette’s hue farthest from the ones in use
(palette::farthest_free_slot), so a deleted profile’s colour is reused
and nothing repeats until all 12 hues are taken. Black and White are never
given: they are only ever someone’s own choice.