Fix determining the format for a color value
QVariant::canConvert and QVariant::convert are not suitable here, so check for the type. This fixes loading color generator layers.
BUG:390033