Flutter Color.RGB 和 adobe XD 具有相同的颜色值不匹配?

标签 flutter flutter-layout

我想改变 flutter 中脚手架的背景颜色。我设置的颜色如下

backgroundColor: Color.fromRGBO(246, 246, 254, 100);

这与我在设计时在 adobe xd 中使用的颜色相同。当我运行应用程序时,两种颜色都不匹配。

我做错了什么吗?

Adobe XD Design Flutter Output

最佳答案

你想要opacity = 1吗??

backgroundColor: Color.fromRGBO(246, 246, 254, 1)

因为

opacity is alpha channel of this color as a double, with 0.0 being transparent and 1.0 being fully opaque.

查看更多here

关于Flutter Color.RGB 和 adobe XD 具有相同的颜色值不匹配?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62992074/

相关文章:

flutter - Flutter:我可以在其中添加Text()的地方

flutter - FlatButton onPressed 在定位小部件中不起作用

flutter - 点按功能上的Flutter GridView菜单不起作用

android - 如何在Flutter中将CircularProgressIndicator放入另一个CircleProgressIndicator中?

Flutter Provider select - 如何处理复杂的返回类型,如列表或 map

flutter - flutter 中的 SuperScript 和 SubScript

flutter - Chrome 没有出现在 vscode 中。 Manjaro Linux

android - Dart/flutter 每次之后如何定期更改计时器

flutter - Flutter 中的动 Canvas 局变化

firebase - 错误 Dart/Flutter : 'context != null' : is not true