UIColor预览工具?
说我有
UIColor *blue = [UIColor colorWithRed:0.65 green:1.0 blue:1.0 alpha:0.8];
没有任何在线工具可以用来预览这个值,这样我就可以找到我想要的颜色。我不确定这些小数叫什么。它不是 RGB 或十六进制,所以我不知道它是什么..
Say I have
UIColor *blue = [UIColor colorWithRed:0.65 green:1.0 blue:1.0 alpha:0.8];
Is there any online tool I can use to preview this values, so I can find what color I want exactly. Im not sure what these decimals are called. Its not RGB or hexadecimal so I dont know what it is..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它是RGB。由于范围是 0 到 1,因此您需要将前三个分量乘以 255,得到 (166, 255, 255),alpha(不透明度)为 80%。
您可以尝试 http://jsbin.com/ilowi5/3 在支持的浏览器中显示这些 UIColor RGBA(例如 Firefox 和 Chrome)。
It is RGB. Since the range is 0 to 1, you need to multiply by 255 to the first three components to get (166, 255, 255) with an alpha (opacity) of 80%.
You could try http://jsbin.com/ilowi5/3 which displays those UIColor in a browser that supports RGBA (e.g. Firefox and Chrome).