如果你是说wp.components.ColorPicker 这是基于react-color, 然后tint 对象还包含rgb 具有RGBA值的对象的属性,如{r: 51, g: 51, b: 51, a: 1}.
因此,在代码中,您可以使用:
style={{ backgroundColor: `rgba(${tint.rgb.r}, ${tint.rgb.g}, ${tint.rgb.b}, ${tint.rgb.a})` }}
要知道color对象中所有可用属性的一个简单技巧是运行
console.log( tint ).. :)