Archive for the ‘RIA Technology’ Category

Convert RGB Color to HSV Color

Saturday, March 13th, 2010

In the RGB model, The red, green, and blue components of a color are constrained to fall between zero and some maximum value. When all components are at their maximum amount, white light is produced. If all components have an equal value less than 100%, a gray tone is produced. The colors produced by the RGB model are very naturally arranged in a cube: if the red, green, and blue components of a color are plotted along the x, y, and z axes respectively, then a specific color can be located by its coordinates in a three dimensional space.

This RGB cube is very straightforward, but its geometry does not reveal the “colorfulness” or “darkness” of a color in a natural way. An alternate way to describe colors is with the hue, saturation and value (HSV) model. This model is usually geometrically described as a cone, where colors toward the point of the cone are dark (low value), and colors further out are brighter (higher value). Colors toward the central axis of the cone are grayer (lower saturation) than the colors located towards the outer surface of the cone (higher saturation). (We should mention, however, that saturation does not entirely coincide with human perception of “colorfulness.”) Rotating around the axis of the cone changes the hue of the color. Hue can be thought of as the main descriptor of a color independent of its intensity or grayness.

Convert RGB to HSV

Max = maximum {R,G,B}

Min = minimum {R,G,B}

Value = Max

Saturation = (Max – Min) / Value

If Max = R and G ≥ B:

Hue = 60*(G – B)/(Max – Min)

If Max = R and B > G:

Hue = 300 + 60*(B – G)/(Max – Min)

If Max = G:

Hue = 120 + 60*(B – R)/(Max – Min)

If Max = B:

Hue = 240 + 60*(R – G)/(Max – Min)

FLEX/FLASH/RIA

Sunday, February 1st, 2009

标记

富交互技术

Monday, December 29th, 2008

标记

touchless

http://www.codeplex.com/touchless

casio全息

 

jQuery初探

Tuesday, December 16th, 2008

jQuery是一个简洁快速的JavaScript库,它能让你在你的网页上简单的操作文档、处理事件、运行动画效果或者添加Ajax交互。jQuery的设计会改变你写JavaScript代码的方式。

jQuery适合于设计师、开发者以及那些还好者,同样适合用于商业开发,可以说jQuery适合任何JavaScript应用的地方,可用于不用的应用程序。

jQuery是一个轻量级的脚本,其代码非常小巧,JavaScript包只有15K左右。

jQuery支持CSS1-CSS3,以及基本的xPath

jQuery是跨浏览器的,它支持的浏览器包括IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+

flash广告引导方法

Sunday, July 20th, 2008

 

在最高一层做一个与舞台等大小的透明MC……
插入元件 影片剪辑
然后加入on(release){getURL("http://abc.com","_blank");

onClipEvent (mouseUp) {
getURL("http://abc.com","_blank");
}
loadMovie(‘CENTOS.jpg’,0);