diff --git a/config.cpp b/config.cpp index 9c23b3e1..b320b337 100644 --- a/config.cpp +++ b/config.cpp @@ -374,7 +374,13 @@ struct color_parameter : public val_parameter { } cld get_cld() override { return has_alpha ? *value : (*value * 256 + 0xFF); } - void load_from_raw(const string& s) override { *value = parsecolor(s, has_alpha); } + void load_from_raw(const string& s) override { + try { + *value = parsecolor(s, has_alpha); + } catch(hr_parse_exception& e) { + sscanf(s.c_str(), "%x", value); + } + } string save() override { return has_alpha ? itsh8(*value) : itsh6(*value); } shared_ptr clone(struct local_parameter_set& lps, void *value) override; };