import React from 'react'; import { Slider } from 'antd'; function getGradientColor(percentage: number) { const startColor = [135, 208, 104]; const endColor = [255, 204, 199]; const midColor = startColor.map((start, i) => { const end = endColor[i]; const delta = end - start; return (start + delta * percentage).toFixed(0); }); return `rgb(${midColor.join(',')})`; } const App: React.FC = () => { const [value, setValue] = React.useState([0, 10, 20]); const start = value[0] / 100; const end = value[value.length - 1] / 100; return ( ); }; export default App;