From 742ee8ed6d300318089b6ae050dc123a88c85b4a Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 1 May 2025 19:11:04 +0900 Subject: feat(blog/icon): improve about page icon --- vhosts/blog/public/about/index.html | 2 +- vhosts/blog/public/my-icon.js | 3 ++- vhosts/blog/static/my-icon.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/vhosts/blog/public/about/index.html b/vhosts/blog/public/about/index.html index 982f2834..ce001a93 100644 --- a/vhosts/blog/public/about/index.html +++ b/vhosts/blog/public/about/index.html @@ -46,7 +46,7 @@ - diff --git a/vhosts/blog/public/my-icon.js b/vhosts/blog/public/my-icon.js index 92e32561..48c556da 100644 --- a/vhosts/blog/public/my-icon.js +++ b/vhosts/blog/public/my-icon.js @@ -110,7 +110,8 @@ const init = () => { } const [r, g, b] = randomChoice(colorMosaic); - ctx.fillStyle = `rgba(${r}, ${g}, ${b}, 0.75)`; + const a = 0.9 - f * 0.05; + ctx.fillStyle = `rgba(${r}, ${g}, ${b}, ${a})`; ctx.fillRect(x, y, 10, 10); } } diff --git a/vhosts/blog/static/my-icon.js b/vhosts/blog/static/my-icon.js index 92e32561..48c556da 100644 --- a/vhosts/blog/static/my-icon.js +++ b/vhosts/blog/static/my-icon.js @@ -110,7 +110,8 @@ const init = () => { } const [r, g, b] = randomChoice(colorMosaic); - ctx.fillStyle = `rgba(${r}, ${g}, ${b}, 0.75)`; + const a = 0.9 - f * 0.05; + ctx.fillStyle = `rgba(${r}, ${g}, ${b}, ${a})`; ctx.fillRect(x, y, 10, 10); } } -- cgit v1.2.3-70-g09d2