lovr.math.gammaToLinear
EditConverts a color from gamma space to linear space.
Arguments
| Name | Type | Description |
| gr | number | The red component of the gamma-space color. |
| gg | number | The green component of the gamma-space color. |
| gb | number | The blue component of the gamma-space color. |
Returns
| Name | Type | Description |
| lr | number | The red component of the resulting linear-space color. |
| lg | number | The green component of the resulting linear-space color. |
| lb | number | The blue component of the resulting linear-space color. |
A table can also be used.
Arguments
| Name | Type | Description |
| color | table | A table containing the components of a gamma-space color. |
Returns
| Name | Type | Description |
| lr | number | The red component of the resulting linear-space color. |
| lg | number | The green component of the resulting linear-space color. |
| lb | number | The blue component of the resulting linear-space color. |
Convert a single color channel.
Arguments
| Name | Type | Description |
| x | number | The color channel to convert. |
Returns
| Name | Type | Description |
| y | number | The converted color channel. |