reform the message box with bubble style

This commit is contained in:
ecwu
2024-07-16 23:01:18 +08:00
parent 0ae53ff954
commit 4bf3e02962
6 changed files with 81 additions and 57 deletions

View File

@@ -6,7 +6,7 @@ const logprobToColor = (logprob: number) => {
// 绿色的RGB值为(0, 255, 0)红色的RGB值为(255, 0, 0)
const red = Math.round(255 * (1 - percent / 100));
const green = Math.round(255 * (percent / 100));
const color = `rgb(${red}, ${green}, 0)`;
const color = `rgba(${red}, ${green}, 0, 0.5)`;
return color;
};