(hex, amt = 14)
| 1211 | return '#' + f(0) + f(8) + f(4); |
| 1212 | } |
| 1213 | function lighten(hex, amt = 14) { |
| 1214 | const { h, s, l } = hexToHsl(hex); return hslToHex(h, s, Math.min(100, l + amt)); |
| 1215 | } |
| 1216 | function darken(hex, amt = 22) { |
| 1217 | const { h, s, l } = hexToHsl(hex); return hslToHex(h, s, Math.max(0, l - amt)); |
| 1218 | } |
no test coverage detected