mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 05:47:10 -04:00
chore(deps): update dependency @antfu/eslint-config to ^0.40.0 (#552)
* chore(deps): update dependency @antfu/eslint-config to ^0.40.0 * chore(deps): updated eslint --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
parent
a2b9b157e5
commit
6ff9a01cc8
13 changed files with 349 additions and 409 deletions
|
@ -4,7 +4,7 @@ const clampHex = (value: number) => Math.max(0, Math.min(255, Math.round(value))
|
|||
|
||||
function lighten(color: string, amount: number): string {
|
||||
const alpha = color.length === 9 ? color.slice(7) : '';
|
||||
const num = parseInt(color.slice(1, 7), 16);
|
||||
const num = Number.parseInt(color.slice(1, 7), 16);
|
||||
|
||||
const r = clampHex(((num >> 16) & 255) + amount);
|
||||
const g = clampHex(((num >> 8) & 255) + amount);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue