调整颜色亮度的算法 [英] Algorithm to adjust color brightness

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

问题描述

我正在做一个试图模拟Google分析地图叠加层的项目。 查看此链接,了解我的意思(您需要向下滚动到Google Analytics(分析)提供的一个地理位置的国家/地区访问者卷概述)。 Flash映射工具我支持十六进制颜色代码(例如color ='FFFFCC')。如果我没有错误这基本上是RGB编码?

I am doing a project trying to simulate Google Analytic Map Overlays. Take a look at this link to see what I mean (you need to scroll down to where it says "Here is a geographical country-based visitor volume overview courtesy of Google Analytics"). The Flash mapping tool I have supports Hex Color codes (e.g. color='FFFFCC'). If I am not mistaken this is basically RGB coding?

我正在寻找一种算法,其中我可以计算地为选定数量的绿色阴影创建颜色代码。

I am looking for an algorithm where I can computationally create the color codes for a select number of shades of green.

看来我真的想要HSV类型计算,而不是RGB。

It seems I really want HSV type calculation and not a RGB one.

推荐答案

我认为最简单的方法是选择一组颜色,然后映射到不同的数据段。我想你可能需要更多的灵活性。

I think the easiest way to accomplish this is to select a set of colors and then map then to different segments of your data. I suppose you may need more flexibility.

如果要计算颜色。您可以在内部使用HSV,然后使用以下算法将其转换为RGB:

If you want to calculate color. You can use HSV internally, and then covert it to RGB using this algorithm:

http://www.cs.rit.edu/~ncs/color/t_convert.html

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

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