储存颜色 [英] storing color

查看:145
本文介绍了储存颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



请问我应该为颜色存储什么值.

我的意思是颜色名称或RGB值,这是灵活的吗?

Hi,

May I know what value shall I store for color.

I mean color name or RGB values, which is flexible ?

推荐答案

我已经建议您使用RGB而不是颜色名称.
这么想吧-由于每个红色,绿色和蓝色组件最多可以包含256个-您将需要256 * 256 * 256个唯一名称来标识所有不同的颜色.
I already suggested you should be using RGB instead of color name.
Think of it this way - since each of the red, green and blue components can be upto 256 each - you would need 256 * 256 * 256 unique names to identify all distinct colors.


这篇关于储存颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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