Skip to content

Commit

Permalink
"Fixes"
Browse files Browse the repository at this point in the history
  • Loading branch information
worldwidepixel committed Oct 14, 2024
1 parent 0e114d5 commit e1c1b7e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion frontend/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,18 @@ const iconColors = ref(["#000000", "#000000", "#000000", "#000000"]);
async function updateIconColors() {
const colors = await prominent(badgeIconUrl.value, { format: "hex", amount: 4, group: 50 });
iconColors.value = [colors[0].toString(), colors[1].toString(), colors[2].toString(), colors[3].toString()];
const safeColours = [
colors[0].toString() ?? "#000000",
colors[1].toString() ?? "#000000",
colors[2].toString() ?? "#000000",
colors[3].toString() ?? "#000000",
];
iconColors.value = [
safeColours[0].toString(),
safeColours[1].toString(),
safeColours[2].toString(),
safeColours[3].toString(),
];
}
function titleCase(str: string) {
Expand Down

0 comments on commit e1c1b7e

Please sign in to comment.