3 /// Performs gamma correction on a single color channel.
5 /// Note that the calculation is approximate if a `pow()` is not available.
7 /// @argument {number (0-1)} $channel
9 /// @return {number (0-1)}
13 @function _gamma($channel) {
14 @if $channel < 0.03928 {
15 @return $channel / 12.92;
17 $c: ($channel + 0.055) / 1.055;
18 @if function-exists("pow") {
21 @return 0.56 * $c * $c * $c + 0.44 * $c * $c;