判断颜色深浅的方法

利用颜色的RGB值,通过公式
g = R*0.299 + G*0.587 + B*0.114

 

求出g, g越小颜色越深
posted @ 2013-10-23 16:53  Story Of My Life  阅读(1388)  评论(0编辑  收藏  举报