Next revision | Previous revision Next revision Both sides next revision | ||
hpl3:community:scripting:classes:ccolor [2015/11/05 11:42] abion47 created |
hpl3:community:scripting:classes:ccolor [2015/11/06 02:34] abion47 [Functions] |
||
---|---|---|---|
Line 4: | Line 4: | ||
^ Field Name ^ Type ^ Description ^ | ^ Field Name ^ Type ^ Description ^ | ||
- | | r | float | | | + | | r | float | The value of the red channel, on a 0-1 scale. | |
- | | g | float | | | + | | g | float | The value of the green channel, on a 0-1 scale. | |
- | | b | float | | | + | | b | float | The value of the blue channel, on a 0-1 scale. | |
- | | a | float | | | + | | a | float | The value of the alpha channel, on a 0-1 scale. | |
====Functions==== | ====Functions==== | ||
^ Return Type ^ Function Name ^ Parameters ^ Description ^ | ^ Return Type ^ Function Name ^ Parameters ^ Description ^ | ||
- | | [[cColor]] | ToLinearSpace | const float afPower, \\ const bool abCorrectAlpha, \\ const | | | + | | [[cColor]] | ToLinearSpace | const float afPower, \\ const bool abCorrectAlpha, \\ const | Returns the color converted into the linear space. | |
- | | [[cColor]] | ToSRGB | const bool abCorrectAlpha, \\ const | | | + | | [[cColor]] | ToSRGB | const bool abCorrectAlpha, \\ const | Returns the color converted into the [[wp>sRGB|sRGB]] space. | |
====Remarks==== | ====Remarks==== | ||
- | Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki! | + | 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. |