Difference between revisions of "ObjectType:rgb"

From Lavish Software Wiki
Jump to navigation Jump to search
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Description ==
+
== Overview ==
 +
{{ObjectType-Vitals|rgb|[[LavishScript]]|none|Same as '''Hex'''|rgb|no|_RGBCOLOR *}}
 
Short for <tt>red, green, blue</tt>, an rgb type describes a complete color, comprised of the primary colors of light.
 
Short for <tt>red, green, blue</tt>, an rgb type describes a complete color, comprised of the primary colors of light.
  
 
== Members ==
 
== Members ==
* [[DataType:string|string]] '''Hex''': A hexadecimal value representing the color, in the form rrggbb.  For example, "ff0000" is full red.
+
* [[ObjectType:string|string]] '''Hex''': A hexadecimal value representing the color, in the form rrggbb.  For example, "ff0000" is full red.
* [[DataType:byteptr|byteptr]] '''Red''': 0-255 indicating the amount of red
+
* [[ObjectType:byte|byte]] '''Red''': 0-255 indicating the amount of red
* [[DataType:byteptr|byteptr]] '''Green''': 0-255 indicating the amount of green
+
* [[ObjectType:byte|byte]] '''Green''': 0-255 indicating the amount of green
* [[DataType:byteptr|byteptr]] '''Blue''': 0-255 indicating the amount of blue
+
* [[ObjectType:byte|byte]] '''Blue''': 0-255 indicating the amount of blue
  
 
== Methods ==
 
== Methods ==
 
+
* '''Set''': Sets the rgb hex to a given value
 
== Returns ==
 
== Returns ==
 
Same as '''Hex'''
 
Same as '''Hex'''
Line 15: Line 16:
 
== Examples ==
 
== Examples ==
 
===Declare an rgb variable===
 
===Declare an rgb variable===
declare Color rgb FF0000
+
*declare Color rgb FF0000
 
===Display a rgb variables red amount===
 
===Display a rgb variables red amount===
echo Red: ${Color.Red}
+
*echo Red: ${Color.Red}
 
===Display a rgb variables green amount===
 
===Display a rgb variables green amount===
echo Green: ${Color.Green}
+
*echo Green: ${Color.Green}
 
===Display a rgb variables blue amount===
 
===Display a rgb variables blue amount===
echo Blue: ${Color.Blue}
+
*echo Blue: ${Color.Blue}
 
===Set a rgb variables color===
 
===Set a rgb variables color===
Color:Set[FF00FF]
+
*Color:Set[FF00FF]
===Set a rg variables green===
+
 
Color.Green:Set[255]
+
 
 +
== Operates On ==
 +
<tt>_RGBCOLOR *</tt>
  
 +
<small>See lstype.h</small>
  
 
== See Also ==
 
== See Also ==
* [[LavishScript:Data Types|Data Types]]
+
{{LavishScript:ObjectType}}
 
 
[[Category:LavishScript]]
 
[[Category:LavishScript Data Types]]
 

Latest revision as of 16:27, 8 July 2018

Overview

Object Type Vitals
rgb
Defined By LavishScript
Inherits none
Reduces To Same as Hex
Variable Object Type rgb
Uses Sub-Types no
C/C++ Type _RGBCOLOR *

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.
  • byte Red: 0-255 indicating the amount of red
  • byte Green: 0-255 indicating the amount of green
  • byte Blue: 0-255 indicating the amount of blue

Methods

  • Set: Sets the rgb hex to a given value

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]


Operates On

_RGBCOLOR *

See lstype.h

See Also

LavishScript Object Types