UNPKG

@td-design/react-native

Version:

react-native UI组件库

18 lines (15 loc) 564 B
import { interpolateColor } from 'react-native-reanimated'; export const mix = (value, x, y) => { 'worklet'; return x * (1 - value) + y * value; }; export const mixColor = function (value, color1, color2) { 'worklet'; let colorSpace = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'RGB'; return interpolateColor(value, [0, 1], [color1, color2], colorSpace); }; export const clamp = (value, lowerBound, upperBound) => { 'worklet'; return Math.min(Math.max(lowerBound, value), upperBound); }; //# sourceMappingURL=redash.js.map