Sort Hex Color Values

ε祈祈猫儿з 提交于 2021-01-27 11:38:22

问题


I have a color table related to products. The value of colors which is a hexadecimal is saved in a nvarchar field.
In the products section I have a dropdown List for colors of a specified product.
So I need to sort these colors from lighter to darker...
I'm using MVC 3.0 and writting C# code.


回答1:


You want to get their intensity, so convert from RGB to HSV. See this post for more details.



来源:https://stackoverflow.com/questions/7434347/sort-hex-color-values

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!