Remove unnecessary table

This commit is contained in:
Zed 2020-06-01 13:50:06 +02:00
parent 12fb55745d
commit 87d1e49f1a

View file

@ -1,4 +1,4 @@
import json, strutils, times, tables, macros, htmlgen, uri, unicode, options
import json, strutils, times, macros, htmlgen, uri, unicode, options
import regex
import types, utils, formatters
@ -82,11 +82,11 @@ proc getBanner*(js: JsonNode): string =
# use primary color from profile picture color histrogram
with p, js{"profile_image_extensions", "mediaColor", "r", "ok", "palette"}:
if p.len > 0:
let pal = p[0]{"rgb"}.getFields
let pal = p[0]{"rgb"}
result = "#"
result.add toHex(pal["red"].getInt, 2)
result.add toHex(pal["green"].getInt, 2)
result.add toHex(pal["blue"].getInt, 2)
result.add toHex(pal{"red"}.getInt, 2)
result.add toHex(pal{"green"}.getInt, 2)
result.add toHex(pal{"blue"}.getInt, 2)
return
return "#161616"