User Tools

Site Tools


hpl3:community:scripting:classes:ccolor

Link to this comparison view

Next revision
Previous revision
hpl3:community:scripting:classes:ccolor [2015/11/05 11:42]
abion47 created
hpl3:community:scripting:classes:ccolor [2020/08/03 18:53] (current)
abion47
Line 1: Line 1:
-=====cColor=====+===== cColor =====
  
-====Fields====+==== Constructors ​====
  
-Field Name ^ Type ^ Description ​^ +^Constructor ​^Description ​| 
-float |   +|cColor() ​|Creates a color with a default value of opaque black. ​
-g | float |   ​+|cColor(float, ​float|Creates a color with the first parameter given to all the RGB values (the color will be a shade of grey) and the second parameter given to the alpha channel. ​
-b | float |   ​+|cColor(float,​ float, ​float|Creates an opaque color using the given values as RGB data. 
-a | float |   ​|+|cColor(float, float, float, float) ​|Creates a color using the given values as RGBA data. |
  
-====Functions====+==== Fields ​====
  
-Return Type ^ Function ​Name ^ Parameters ​^ Description ​^ +^Field Name ^Type ^Description ​| 
-[[cColor]] ​ToLinearSpace ​const float afPower, \\ const bool abCorrectAlpha,​ \\ const   ​+||float |The value of the red channel. | 
-[[cColor]] ​ToSRGB ​const bool abCorrectAlpha,​ \\ const   ​|+|g |float |The value of the green channel. ​
 +||float |The value of the blue channel. | 
 +|a |float ​|The value of the alpha channel. ​|
  
-====Remarks====+==== Functions ​====
  
-Have some helpful descriptions ​to add to this class? Edit this page and add your insight to the Wiki!+^Return Type ^Function Name ^Parameters ^Description | 
 +|[[:​hpl3:​community:​scripting:​classes:​ccolor|cColor]] |ToLinearSpace |const float afPower, \\ const bool abCorrectAlpha,​ \\ const |Returns the color converted into the linear space. | 
 +|[[:​hpl3:​community:​scripting:​classes:​ccolor|cColor]] |ToSRGB |const bool abCorrectAlpha,​ \\ const |Returns the color converted into the [[wp>​sRGB]] space. | 
 + 
 +==== Remarks ==== 
 + 
 +Color channel values are stored using a 0.0 - 1.0 range, where 0.0 is equal to 0 and 1.0 is equal to 255. 
 + 
 +Read [[http://​stackoverflow.com/​questions/​12524623/​what-are-the-practical-differences-when-working-with-colors-in-a-linear-vs-a-no|this post on StackOverflow]] for an explanation on the differences between the linear color space and the sRGB color space. 
 + 
 +\\
  
hpl3/community/scripting/classes/ccolor.1446723766.txt.gz · Last modified: 2015/11/05 11:42 by abion47