如何在目标 c 中打印 RGB 颜色的名称? [英] How to print RGB color's name in objective c?

查看:42
本文介绍了如何在目标 c 中打印 RGB 颜色的名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 RGB 中选择颜色并将其保存在带有颜色名称的字符串中

I select the color in RGB and save it in string with color name

我的代码

color =[UIColor colorWithRed:255/255.0 green:0.0/255.0 blue:0.0/255.0 alpha:pixel[3]/255.0];

电流输出:彩色打印:1 0 0 1

预期输出:Color = Red

推荐答案

通过此链接..对我来说最好的解决方案.也可能对你们有帮助.

Go throuhg this link.. Best solution for me. Might be help you guys also.

https://github.com/daniel-beard/DBColorNames

这篇关于如何在目标 c 中打印 RGB 颜色的名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆