Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/backend/node_modules/@buffetjs/utils/src/gradient.js
Назад
const subtractLight = (color, amount) => { const cc = parseInt(color, 16) - amount; let c = cc < 0 ? 0 : cc; c = c.toString(16).length > 1 ? c.toString(16) : `0${c.toString(16)}`; return c; }; const gradient = (colour, amount) => { let color = colour.indexOf('#') >= 0 ? colour.substring(1, colour.length) : colour; const percentage = parseInt((255 * amount) / 100, 10); color = `#${subtractLight(color.substring(0, 2), percentage)}${subtractLight( color.substring(2, 4), percentage )}${subtractLight(color.substring(4, 6), percentage)}`; return color; }; export default gradient;
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка