PHP Classes

File: public/asset/vendor/select2/docs/themes/learn2/scss/vendor/color-schemer/color-schemer/_interpolation.scss

Recommend this page to a friend!
  Classes of fathurrahman   mnTemplate   public/asset/vendor/select2/docs/themes/learn2/scss/vendor/color-schemer/color-schemer/_interpolation.scss   Download  
File: public/asset/vendor/select2/docs/themes/learn2/scss/vendor/color-schemer/color-schemer/_interpolation.scss
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: mnTemplate
Route HTTP requests to callback functions
Author: By
Last change:
Date: 1 year ago
Size: 986 bytes
 

Contents

Class file image Download
@function cs-interpolate($value, $units: 360, $stops: $ryb-interpolation) { // Loop numbers out of scale back into the scale. @while $value >= 360 { $value: $value - 360; } @while $value < 0 { $value: $value + 360; } // Find out how many units in each stop $cs-color-deg: $units / length($stops); // Count through stops $cs-deg-count: $cs-color-deg; $cs-stop-count: 1; // Add the first stop to the end so it will be // interpolated with the last stop. $stops: append($stops, nth($stops, 1)); // Start interpolating @for $i from 0 through length($stops) { @if $value < $cs-deg-count { @return cs-mix(nth($stops, $cs-stop-count + 1), nth($stops, $cs-stop-count), abs(percentage(($cs-deg-count - $value) / $cs-color-deg) - 100 ), $model: rgb); } // If the value is not in this stop, loop up to another stop. @else { $cs-deg-count: $cs-deg-count + $cs-color-deg; $cs-stop-count: $cs-stop-count + 1 } } }