Change it to this:
async function showColorPicker() {
var result;
await require("photoshop").core.executeAsModal(async (executionControl, descriptor) => {
result = await batchPlay(
[
{
_obj: "showColorPicker",
_target: [
{
_ref: "application"
}
]
}
], {
});
// return result[0].RGBFloatColor;
});
return result[0].RGBFloatColor;
}