Your guess is what I was thinking too - let's keep the validation here and move the color derivation into rp_info.js. rp_info.js deals more with RP related stuff, so I think it makes more sense there.  dialog.js is misnamed, it should be called "api_entry_point.js" or something along those lines, do you have any suggestions?