Remove color utility and tinycolor module

This commit is contained in:
Andreas Nedbal 2022-04-11 22:07:59 +02:00 committed by Andreas Nedbal
parent 3bbc7a36f8
commit c1d1ab6501
2 changed files with 0 additions and 24 deletions

View File

@ -1,23 +0,0 @@
import tinycolor from 'tinycolor2'
window.doppler = (percentage, value, relative = false) ->
while percentage >= 1
percentage /= 10
tc_color = tinycolor(value).toRgb()
color = [tc_color.r, tc_color.g, tc_color.b]
if relative
for _c, i in color
x = (255 - color[i]) * percentage
if x == 0
x = color[i] * percentage
color[i] -= x
else
color[i] += x
else
adj = 255 * percentage
for _c, i in color
if color[i] + adj > 255
color[i] -= adj
else
color[i] += adj
'#' + color.map((x) -> Math.floor(Math.max(0, Math.min(255, x))).toString(16)).join ''

View File

@ -6,7 +6,6 @@ import 'popper.js'
import 'bootstrap'
import '../legacy/pagination'
import '../legacy/util'
_ready = ->
$('[data-toggle="tooltip"]').tooltip()