Packagefrocessing.color
Classpublic class FColorUtil

FColorUtil クラスは、色関連のユーティリティを提供します.

See also

frocessing.color.FColor
frocessing.color.ColorRGB
frocessing.color.ColorHSV
frocessing.color.ColorBlend
frocessing.color.ColorLerp
frocessing.color.ColorConvert


Public Methods
 MethodDefined by
  
blendColor(color1:IColor, color2:IColor, blend_mode:String):FColor
[static] 2つの色をブレンドした FColor クラスのインスタンスを生成します.
FColorUtil
  
color(value:uint):FColor
[static] 24bit Color (0xRRGGBB) から FColor クラスのインスタンスを生成します.
FColorUtil
  
color32(value:uint):FColor
[static] 32bit Color (0xAARRGGBB) から FColor クラスのインスタンスを生成します.
FColorUtil
  
gray(gray_:uint, a:Number = 1.0):FColor
[static] グレイ値 から FColor クラスのインスタンスを生成します.
FColorUtil
  
grayToHSV(gray_:uint, a:Number = 1.0):ColorHSV
[static] グレイ値 から ColorHSV クラスのインスタンスを生成します.
FColorUtil
  
grayToRGB(gray_:uint, a:Number = 1.0):ColorRGB
[static] グレイ値 から ColorRGB クラスのインスタンスを生成します.
FColorUtil
  
hsv(h:Number, s:Number = 1.0, v:Number = 1.0, a:Number = 1.0):FColor
[static] HSV値 から FColor クラスのインスタンスを生成します.
FColorUtil
  
hsvToRGB(h:Number, s:Number = 1.0, v:Number = 1.0, a:Number = 1.0):ColorRGB
[static] HSV値 から ColorRGB クラスのインスタンスを生成します.
FColorUtil
  
invert(col:uint):uint
[static]
FColorUtil
  
lerpColorHSV(color1:IFColor, color2:IFColor, amt:Number):FColor
[static] 2つの色の 中間色(HSV) の FColor クラスのインスタンスを生成します.
FColorUtil
  
lerpColorRGB(color1:IFColor, color2:IFColor, amt:Number):FColor
[static] 2つの色の 中間色 の FColor クラスのインスタンスを生成します.
FColorUtil
  
rgb(r:uint, g:uint, b:uint, a:Number = 1.0):FColor
[static] RGB値 から FColor クラスのインスタンスを生成します.
FColorUtil
  
rgbToHSV(r:uint, g:uint, b:uint, a:Number = 1.0):ColorHSV
[static] RGB値 から ColorHSV クラスのインスタンスを生成します.
FColorUtil
  
value32ToHSV(value:uint):ColorHSV
[static] 32bit Color (0xAARRGGBB) から ColorHSV クラスのインスタンスを生成します.
FColorUtil
  
value32ToRGB(value:uint):ColorRGB
[static] 32bit Color (0xAARRGGBB) から ColorRGB クラスのインスタンスを生成します.
FColorUtil
  
valueOfARGB(r:uint, g:uint, b:uint, a:Number = 1.0):uint
[static] RGB値,アルファ値 を 32bit Color (uint) に変換します.
FColorUtil
  
valueOfGray(gray:uint, a:Number):uint
[static] グレイ値 を 24bit Color (uint) または、32bit Color (uint) に変換します.
FColorUtil
  
valueOfHSV(h:Number, s:Number = 1.0, v:Number = 1.0, a:Number):uint
[static] HSV値 を 24bit Color (uint) または、32bit Color (uint) に変換します.
FColorUtil
  
valueOfRGB(r:uint, g:uint, b:uint):uint
[static] RGB値 を 24bit Color (uint) に変換します.
FColorUtil
  
valueToHSV(value:uint):ColorHSV
[static] 24bit Color (0xRRGGBB) から ColorHSV クラスのインスタンスを生成します.
FColorUtil
  
valueToRGB(value:uint):ColorRGB
[static] 24bit Color (0xRRGGBB) から ColorRGB クラスのインスタンスを生成します.
FColorUtil
Method detail
blendColor()method
public static function blendColor(color1:IColor, color2:IColor, blend_mode:String):FColor

2つの色をブレンドした FColor クラスのインスタンスを生成します.

ブレンドモードについては、ColorBlend を参照してください.

Parameters
color1:IColor — back color
 
color2:IColor — fore color
 
blend_mode:String

Returns
FColor

See also

color()method 
public static function color(value:uint):FColor

24bit Color (0xRRGGBB) から FColor クラスのインスタンスを生成します.

Parameters
value:uint — 0xRRGGBB

Returns
FColor
color32()method 
public static function color32(value:uint):FColor

32bit Color (0xAARRGGBB) から FColor クラスのインスタンスを生成します.

Parameters
value:uint — 0xAARRGGBB

Returns
FColor
gray()method 
public static function gray(gray_:uint, a:Number = 1.0):FColor

グレイ値 から FColor クラスのインスタンスを生成します.

Parameters
gray_:uint — gray [0,255]
 
a:Number (default = 1.0) — alpha [0.0,1.0]

Returns
FColor
grayToHSV()method 
public static function grayToHSV(gray_:uint, a:Number = 1.0):ColorHSV

グレイ値 から ColorHSV クラスのインスタンスを生成します.

Parameters
gray_:uint — gray [0,255]
 
a:Number (default = 1.0) — alpha [0.0,1.0]

Returns
ColorHSV
grayToRGB()method 
public static function grayToRGB(gray_:uint, a:Number = 1.0):ColorRGB

グレイ値 から ColorRGB クラスのインスタンスを生成します.

Parameters
gray_:uint — gray [0,255]
 
a:Number (default = 1.0) — alpha [0.0,1.0]

Returns
ColorRGB
hsv()method 
public static function hsv(h:Number, s:Number = 1.0, v:Number = 1.0, a:Number = 1.0):FColor

HSV値 から FColor クラスのインスタンスを生成します.

Parameters
h:Number — hue degree 360
 
s:Number (default = 1.0) — saturation [0.0,1.0]
 
v:Number (default = 1.0) — brightness [0.0,1.0]
 
a:Number (default = 1.0) — alpha [0.0,1.0]

Returns
FColor
hsvToRGB()method 
public static function hsvToRGB(h:Number, s:Number = 1.0, v:Number = 1.0, a:Number = 1.0):ColorRGB

HSV値 から ColorRGB クラスのインスタンスを生成します.

Parameters
h:Number — hue degree 360
 
s:Number (default = 1.0) — saturation [0.0,1.0]
 
v:Number (default = 1.0) — brightness [0.0,1.0]
 
a:Number (default = 1.0) — alpha [0.0,1.0]

Returns
ColorRGB
invert()method 
public static function invert(col:uint):uintParameters
col:uint

Returns
uint
lerpColorHSV()method 
public static function lerpColorHSV(color1:IFColor, color2:IFColor, amt:Number):FColor

2つの色の 中間色(HSV) の FColor クラスのインスタンスを生成します.

Parameters
color1:IFColor — from color
 
color2:IFColor — to color
 
amt:Number — [0.0,1.0]

Returns
FColor

See also

lerpColorRGB()method 
public static function lerpColorRGB(color1:IFColor, color2:IFColor, amt:Number):FColor

2つの色の 中間色 の FColor クラスのインスタンスを生成します.

Parameters
color1:IFColor — from color
 
color2:IFColor — to color
 
amt:Number — [0.0,1.0]

Returns
FColor

See also

rgb()method 
public static function rgb(r:uint, g:uint, b:uint, a:Number = 1.0):FColor

RGB値 から FColor クラスのインスタンスを生成します.

Parameters
r:uint — red [0,255]
 
g:uint — green [0,255]
 
b:uint — blue [0,255]
 
a:Number (default = 1.0) — alpha [0.0,1.0]

Returns
FColor
rgbToHSV()method 
public static function rgbToHSV(r:uint, g:uint, b:uint, a:Number = 1.0):ColorHSV

RGB値 から ColorHSV クラスのインスタンスを生成します.

Parameters
r:uint — red [0,255]
 
g:uint — green [0,255]
 
b:uint — blue [0,255]
 
a:Number (default = 1.0) — alpha [0.0,1.0]

Returns
ColorHSV
value32ToHSV()method 
public static function value32ToHSV(value:uint):ColorHSV

32bit Color (0xAARRGGBB) から ColorHSV クラスのインスタンスを生成します.

Parameters
value:uint — 0xAARRGGBB

Returns
ColorHSV
value32ToRGB()method 
public static function value32ToRGB(value:uint):ColorRGB

32bit Color (0xAARRGGBB) から ColorRGB クラスのインスタンスを生成します.

Parameters
value:uint — 0xAARRGGBB

Returns
ColorRGB
valueOfARGB()method 
public static function valueOfARGB(r:uint, g:uint, b:uint, a:Number = 1.0):uint

RGB値,アルファ値 を 32bit Color (uint) に変換します.

Parameters
r:uint — red [0,255]
 
g:uint — green [0,255]
 
b:uint — blue [0,255]
 
a:Number (default = 1.0) — alpha [0.0,1.0]

Returns
uint — 0xAARRGGBB
valueOfGray()method 
public static function valueOfGray(gray:uint, a:Number):uint

グレイ値 を 24bit Color (uint) または、32bit Color (uint) に変換します.

Parameters
gray:uint — gray [0,255]
 
a:Number — alpha [0.0,1.0]

Returns
uint — 0xRRGGBB or 0xAARRGGBB
valueOfHSV()method 
public static function valueOfHSV(h:Number, s:Number = 1.0, v:Number = 1.0, a:Number):uint

HSV値 を 24bit Color (uint) または、32bit Color (uint) に変換します.  

Parameters
h:Number — hue degree 360
 
s:Number (default = 1.0) — saturation [0.0,1.0]
 
v:Number (default = 1.0) — brightness [0.0,1.0]
 
a:Number — alpha [0.0,1.0]

Returns
uint — 0xRRGGBB or 0xAARRGGBB
valueOfRGB()method 
public static function valueOfRGB(r:uint, g:uint, b:uint):uint

RGB値 を 24bit Color (uint) に変換します.

Parameters
r:uint — red [0,255]
 
g:uint — green [0,255]
 
b:uint — blue [0,255]

Returns
uint — 0xRRGGBB
valueToHSV()method 
public static function valueToHSV(value:uint):ColorHSV

24bit Color (0xRRGGBB) から ColorHSV クラスのインスタンスを生成します.

Parameters
value:uint — 0xRRGGBB

Returns
ColorHSV
valueToRGB()method 
public static function valueToRGB(value:uint):ColorRGB

24bit Color (0xRRGGBB) から ColorRGB クラスのインスタンスを生成します.

Parameters
value:uint — 0xRRGGBB

Returns
ColorRGB