@@ -15,7 +15,7 @@ import BlobsTable from "./tables/BlobsTable.vue"
1515import NamespacesTable from " ./tables/NamespacesTable.vue"
1616
1717/** Services */
18- import { capitilize , comma , formatBytes , isMainnet , roundTo , truncateDecimalPart } from " @/services/utils"
18+ import { capitilize , comma , formatBytes , hexToRgba , isMainnet , roundTo , truncateDecimalPart } from " @/services/utils"
1919import { exportToCSV } from " @/services/utils/export"
2020import { getRankCategory } from " @/services/constants/rollups"
2121
@@ -173,18 +173,8 @@ onMounted(async () => {
173173 },
174174 })
175175
176- /** Rollup Primary Color */
177- const image = new Image ()
178- image .crossOrigin = " anonymous"
179- image .onload = () => {
180- const context = document .createElement (" canvas" ).getContext (" 2d" )
181- context .drawImage (image, 0 , 0 , 1 , 1 )
182- const i = context .getImageData (0 , 0 , 1 , 1 ).data
183-
184- rollupColor .value = ` rgba(${ i[0 ]} ,${ i[1 ]} ,${ i[2 ]} ,${ i[3 ]} )`
185- rollupColorAlpha .value = ` rgba(${ i[0 ]} ,${ i[1 ]} ,${ i[2 ]} ,0)`
186- }
187- image .src = ` ${ props .rollup .logo } ?query=bg`
176+ rollupColor .value = hexToRgba (props .rollup .color , 1 )
177+ rollupColorAlpha .value = hexToRgba (props .rollup .color , 0 )
188178})
189179
190180/** Refetch Blobs/Messages on new page */
0 commit comments