perf(TmsInstanceTicker): color関数に変更 (taiyme#283)
This commit is contained in:
parent
edb2e64035
commit
095a47d63b
|
@ -60,7 +60,6 @@ export const getTickerInfo = (props: MkInstanceTickerProps): ITickerInfo => {
|
|||
type ITickerColors = {
|
||||
readonly '--ticker-bg': string;
|
||||
readonly '--ticker-fg': string;
|
||||
readonly '--ticker-bg-rgb': string;
|
||||
};
|
||||
|
||||
const TICKER_YUV_THRESHOLD = 191 as const;
|
||||
|
@ -81,7 +80,6 @@ export const getTickerColors = (info: ITickerInfo): ITickerColors => {
|
|||
const tickerColors = {
|
||||
'--ticker-fg': fgHex,
|
||||
'--ticker-bg': bgHex,
|
||||
'--ticker-bg-rgb': `${r}, ${g}, ${b}`,
|
||||
} as const satisfies ITickerColors;
|
||||
|
||||
tickerColorsCache.set(bgHex, tickerColors);
|
||||
|
|
|
@ -30,8 +30,8 @@ const tickerColorsRef = computed(() => getTickerColors(tickerInfoRef.value));
|
|||
overflow: clip;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
background-color: var(--ticker-bg, #777777);
|
||||
color: var(--ticker-fg, #ffffff);
|
||||
background-color: var(--ticker-bg, #777);
|
||||
color: var(--ticker-fg, #fff);
|
||||
|
||||
--ticker-size: 2ex;
|
||||
display: grid;
|
||||
|
|
Loading…
Reference in New Issue