lovr.math.linearToGamma
EditConverts a color from linear space to gamma space.
Arguments
Name | Type | Description |
lr | number | The red component of the linear-space color. |
lg | number | The green component of the linear-space color. |
lb | number | The blue component of the linear-space color. |
Returns
Name | Type | Description |
gr | number | The red component of the resulting gamma-space color. |
gg | number | The green component of the resulting gamma-space color. |
gb | number | The blue component of the resulting gamma-space color. |
A table can also be used.
Arguments
Name | Type | Description |
color | table | A table containing the components of a linear-space color. |
Returns
Name | Type | Description |
gr | number | The red component of the resulting gamma-space color. |
gg | number | The green component of the resulting gamma-space color. |
gb | number | The blue component of the resulting gamma-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. |