Added new design
[wolnelektury.git] / src / wolnelektury / static / 2022 / styles / utils / bourbon / utilities / _gamma.scss
1 @charset "UTF-8";
2
3 /// Performs gamma correction on a single color channel.
4 ///
5 /// Note that Sass does not have a `pow()` function, so the calculation
6 /// is approximate.
7 ///
8 /// @argument {number (0-1)} $channel
9 ///
10 /// @return {number (0-1)}
11 ///
12 /// @access private
13
14 @function _gamma($channel) {
15   @if $channel < 0.03928 {
16     @return $channel / 12.92;
17   } @else {
18     $c: ($channel + 0.055) / 1.055;
19     @return (133 * $c * $c * $c + 155 * $c * $c) / 288;
20   }
21 }