感谢,很好看,就是不太好区分。用AI做了自己喜欢的版本。有AI真的方便做到个性化需求。当然还需要模板,非常感谢提供了这个模板。


也附上我的代码:
/* --- Obsidian 彩虹标签:亮色模式优化版 --- */
.theme-light {
/* 1. 基础结构:保持背景透明,文字清晰 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header {
background-color: transparent !important;
transition: all 0.2s ease-in-out;
border-bottom: 3px solid transparent;
border-radius: 0 0 5px 5px;
color: var(--text-muted); /* 默认文字颜色 */
}
/* 2. 激活状态:文字完全黑亮,背景微弱阴影区分 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header.is-active {
color: var(--text-normal) !important;
background-color: rgba(0, 0, 0, 0.03) !important; /* 淡淡的灰色底,区分当前页 */
border-bottom: 4px solid transparent;
}
/* 3. 十色循环逻辑 (10n+1 到 10n+10) */
/* 1. 红色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+1) { border-bottom-color: rgba(211, 47, 47, 0.4); color: #c62828; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+1).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+1):hover { border-bottom-color: rgb(211, 47, 47); }
/* 2. 蓝色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+2) { border-bottom-color: rgba(25, 118, 210, 0.4); color: #1565c0; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+2).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+2):hover { border-bottom-color: rgb(25, 118, 210); }
/* 3. 绿色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+3) { border-bottom-color: rgba(56, 142, 60, 0.4); color: #2e7d32; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+3).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+3):hover { border-bottom-color: rgb(56, 142, 60); }
/* 4. 黄褐色 (亮色模式下纯黄太晃眼,调深一点) */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+4) { border-bottom-color: rgba(245, 124, 0, 0.4); color: #ef6c00; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+4).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+4):hover { border-bottom-color: rgb(245, 124, 0); }
/* 5. 紫色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+5) { border-bottom-color: rgba(123, 31, 162, 0.4); color: #6a1b9a; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+5).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+5):hover { border-bottom-color: rgb(123, 31, 162); }
/* 6. 橙红 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+6) { border-bottom-color: rgba(230, 74, 25, 0.4); color: #bf360c; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+6).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+6):hover { border-bottom-color: rgb(230, 74, 25); }
/* 7. 青蓝色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+7) { border-bottom-color: rgba(0, 151, 167, 0.4); color: #00838f; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+7).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+7):hover { border-bottom-color: rgb(0, 151, 167); }
/* 8. 深酸橙 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+8) { border-bottom-color: rgba(175, 180, 43, 0.4); color: #827717; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+8).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+8):hover { border-bottom-color: rgb(175, 180, 43); }
/* 9. 靛蓝色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+9) { border-bottom-color: rgba(48, 63, 159, 0.4); color: #283593; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+9).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+9):hover { border-bottom-color: rgb(48, 63, 159); }
/* 10. 翠绿色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n) { border-bottom-color: rgba(104, 159, 56, 0.4); color: #33691e; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n):hover { border-bottom-color: rgb(104, 159, 56); }
}
/* --- Obsidian 彩虹标签:深色模式优化版 --- */
.theme-dark {
/* 1. 基础结构:保持背景透明,文字清晰 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header {
background-color: transparent !important;
transition: all 0.2s ease-in-out;
border-bottom: 3px solid transparent;
border-radius: 0 0 5px 5px;
color: var(--text-muted); /* 非激活文字稍微柔和 */
}
/* 2. 激活状态:文字完全发亮,背景微弱区分 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header.is-active {
color: var(--text-normal) !important;
background-color: rgba(255, 255, 255, 0.03) !important;
border-bottom: 4px solid transparent;
}
/* 3. 十色循环逻辑 (10n+1 到 10n+10) */
/* 1. 红色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+1) { border-bottom-color: rgba(239, 83, 80, 0.3); color: #ef9a9a; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+1).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+1):hover { border-bottom-color: rgb(239, 83, 80); }
/* 2. 蓝色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+2) { border-bottom-color: rgba(66, 165, 245, 0.3); color: #90caf9; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+2).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+2):hover { border-bottom-color: rgb(66, 165, 245); }
/* 3. 绿色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+3) { border-bottom-color: rgba(102, 187, 106, 0.3); color: #a5d6a7; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+3).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+3):hover { border-bottom-color: rgb(102, 187, 106); }
/* 4. 黄色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+4) { border-bottom-color: rgba(255, 202, 40, 0.3); color: #fff59d; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+4).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+4):hover { border-bottom-color: rgb(255, 202, 40); }
/* 5. 紫色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+5) { border-bottom-color: rgba(171, 71, 188, 0.3); color: #ce93d8; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+5).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+5):hover { border-bottom-color: rgb(171, 71, 188); }
/* 6. 橙色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+6) { border-bottom-color: rgba(255, 112, 67, 0.3); color: #ffab91; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+6).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+6):hover { border-bottom-color: rgb(255, 112, 67); }
/* 7. 青色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+7) { border-bottom-color: rgba(38, 198, 218, 0.3); color: #80deea; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+7).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+7):hover { border-bottom-color: rgb(38, 198, 218); }
/* 8. 酸橙绿 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+8) { border-bottom-color: rgba(212, 225, 87, 0.3); color: #e6ee9c; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+8).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+8):hover { border-bottom-color: rgb(212, 225, 87); }
/* 9. 靛蓝 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+9) { border-bottom-color: rgba(126, 87, 194, 0.3); color: #b39ddb; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+9).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n+9):hover { border-bottom-color: rgb(126, 87, 194); }
/* 10. 浅绿色 */
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n) { border-bottom-color: rgba(156, 204, 101, 0.3); color: #c5e1a5; }
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n).is-active,
:where(.workspace .mod-root .workspace-tabs) .workspace-tab-header:nth-child(10n):hover { border-bottom-color: rgb(156, 204, 101); }
}