Difference between revisions of "ObjectType:rgb"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
== Members == | == Members == | ||
* [[DataType:string|string]] '''Hex''': A hexadecimal value representing the color, in the form rrggbb. For example, "ff0000" is full red. | * [[DataType:string|string]] '''Hex''': A hexadecimal value representing the color, in the form rrggbb. For example, "ff0000" is full red. | ||
− | * [[DataType: | + | * [[DataType:byteptr|byteptr]] '''Red''': 0-255 indicating the amount of red |
− | * [[DataType: | + | * [[DataType:byteptr|byteptr]] '''Green''': 0-255 indicating the amount of green |
− | * [[DataType: | + | * [[DataType:byteptr|byteptr]] '''Blue''': 0-255 indicating the amount of blue |
== Methods == | == Methods == | ||
Line 14: | Line 14: | ||
== Examples == | == Examples == | ||
+ | ===Declare an rgb variable=== | ||
+ | declare Color rgb FF0000 | ||
+ | ===Display a rgb variables red amount=== | ||
+ | echo Red: ${Color.Red} | ||
+ | ===Display a rgb variables green amount=== | ||
+ | echo Green: ${Color.Green} | ||
+ | ===Display a rgb variables blue amount=== | ||
+ | echo Blue: ${Color.Blue} | ||
+ | ===Set a rgb variables color=== | ||
+ | Color:Set[FF00FF] | ||
+ | ===Set a rg variables green=== | ||
+ | Color.Green:Set[255] | ||
+ | |||
== See Also == | == See Also == |
Revision as of 01:47, 26 August 2005
Contents
Description
Short for red, green, blue, an rgb type describes a complete color, comprised of the primary colors of light.
Members
- string Hex: A hexadecimal value representing the color, in the form rrggbb. For example, "ff0000" is full red.
- byteptr Red: 0-255 indicating the amount of red
- byteptr Green: 0-255 indicating the amount of green
- byteptr Blue: 0-255 indicating the amount of blue
Methods
Returns
Same as Hex
Examples
Declare an rgb variable
declare Color rgb FF0000
Display a rgb variables red amount
echo Red: ${Color.Red}
Display a rgb variables green amount
echo Green: ${Color.Green}
Display a rgb variables blue amount
echo Blue: ${Color.Blue}
Set a rgb variables color
Color:Set[FF00FF]
Set a rg variables green
Color.Green:Set[255]