mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 05:59:45 -05:00
[web] Lint source code
This commit is contained in:
@@ -6,16 +6,12 @@ const toColor = (string) => {
|
||||
return (hash & 0x00ffffff).toString(16)
|
||||
}
|
||||
|
||||
const luminance = (color) => {
|
||||
return (
|
||||
[0.2126, 0.7152, 0.0722].reduce(
|
||||
(luminance, factor, index) =>
|
||||
luminance +
|
||||
Number('0x' + color.slice(index * 2, index * 2 + 2)) * factor,
|
||||
0
|
||||
) / 255
|
||||
)
|
||||
}
|
||||
const luminance = (color) =>
|
||||
[0.2126, 0.7152, 0.0722].reduce(
|
||||
(luminance, factor, index) =>
|
||||
luminance + Number(`0x${color.slice(index * 2, index * 2 + 2)}`) * factor,
|
||||
0
|
||||
) / 255
|
||||
|
||||
export const renderSVG = (data) => {
|
||||
const color = toColor(data.alternate),
|
||||
|
||||
Reference in New Issue
Block a user