颜色名称及其值 [英] color name and its values

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

问题描述



我可以知道如何在sql数据库中存储颜色名称及其值吗?
我应该使用哪种类型的变量来保存颜色名称及其值?

Hi,

May I know how to store color name and its value in sql database?
What type of variable should I use for holding color name and its values?

推荐答案

您可以使用Varchar字段来存储颜色名称&价值观.参考 HTML颜色名称&值 [ ^ ]
You can use Varchar field to store the color names & values. Reference HTML Color Names & Values[^]


这取决于您使用的颜色格式.
如果使用的是RGB,则可以使用十六进制格式或整数.

您可以将RGB分成三列以提高灵活性-或将它们存储在一起.
It depends on what color format you are using.
If you are using RGB you could use hex format or integers.

You could break RGB into three separate columns for greater flexibility - or you could store them together.


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

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