ColorModeHSVSample
see http://gihyo.jp/design/feature/01/frocessing/0002
/**
* Copyright nutsu ( http://wonderfl.net/user/nutsu )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/yoNp
*/
// see http://gihyo.jp/design/feature/01/frocessing/0002
package
{
import frocessing.display.F5MovieClip2D;
[SWF(width=465,height=465,backgroundColor=0x000000)]
public class ColorModeHSVSample extends F5MovieClip2D
{
public function ColorModeHSVSample()
{
var n:int = 10;
//線は描画しない
noStroke();
//HSVで色指定
//値の範囲を,色相(0~n),彩度(0~1),明度(0~n)に指定
colorMode( HSV, n, 1, n );
for ( var i:int = 0; i <= n; i++ ) {
for ( var j:int = 0; j <= n; j++ ) {
//塗りの指定
fill( i, 1, n - j );
//円の描画
var cx:Number = 33 + 40 * i;
var cy:Number = 33 + 40 * j;
circle( cx, cy, 19 );
}
}
}
}
}