fix: deepen ice-blue labels after measured contrast check

这个提交包含在:
mac 于 2026-11-04 13:47:24 +08:00 提交
1 父节点 77856a1334
当前提交 09e04ca647
3 个文件已更改
+6 -3

没有与搜索条件相匹配的文件

+3
查看文件
@@ -0,0 +1,3 @@
# 冰蓝柔光验证
首次 Release 编译成功,原生预检608项中607通过;浅色文字在 calibrated RGB 转到 sRGB 后最低对比3.956,未达到4.5,交付脚本停止,原正式1.8.4未替换,也未提交Apple。已加深次要文字与行标签,并将强调色文字纳入对比检查,随后重跑完整预检。
@@ -28,7 +28,7 @@
run.record(@"compact-gold-labels-have-readable-contrast",minimum>=4.5,@{@"minimumContrast":@(minimum)});
NSDictionary *themeSnapshot=[view presetSnapshot];int themeUndo=host->_undoStarts;
DYSetThemeIndex(7);double lightMinimum=100;
for(NSString *text in @[@"text",@"secondary",@"slot15"])for(NSString *surface in @[@"background",@"backgroundEnd",@"card",@"cardEnd",@"field",@"headerTop",@"headerBottom"])
for(NSString *text in @[@"text",@"secondary",@"slot15",@"accent"])for(NSString *surface in @[@"background",@"backgroundEnd",@"card",@"cardEnd",@"field",@"headerTop",@"headerBottom"])
lightMinimum=std::min(lightMinimum,(luminance(DYThemePalette()[surface])+.05)/(luminance(DYThemePalette()[text])+.05));
run.record(@"soft-light-text-contrast-at-least-4.5",lightMinimum>=4.5,@{@"minimumContrast":@(lightMinimum)});
[view performSelector:@selector(themeChanged:) withObject:nil];
+2 -2
查看文件
@@ -33,7 +33,7 @@ static const double paletteRGB[8][17][3]={
{{0.23,0.15,0.08},{0.16,0.1,0.05},{0.35,0.22,0.11},{0.26,0.16,0.08},{0.45,0.28,0.14},{0.36,0.22,0.1},{0.72,0.44,0.18},{0.56,0.32,0.12},{0.29,0.18,0.09},{0.2,0.12,0.06},{0.98,0.67,0.31},{0.86,0.47,0.17},{1.0,0.86,0.57},{0.93,0.59,0.22},{1.0,0.96,0.9},{0.97,0.9,0.82},{0.8,0.7,0.58}},
{{.065,.060,.050},{.012,.012,.012},{.12,.105,.075},{.045,.042,.035},{.105,.092,.065},{.15,.125,.075},{.17,.14,.085},{.075,.065,.045},{.23,.20,.14},{.10,.09,.065},{.98,.82,.42},{.72,.51,.18},{1,.90,.65},{.88,.74,.43},{1,.86,.48},{.96,.82,.49},{.79,.70,.48}},
{{.11,.10,.13},{.045,.040,.055},{.16,.14,.20},{.083,.073,.103},{.115,.104,.139},{.15,.135,.18},{.16,.145,.19},{.105,.10,.13},{.24,.22,.28},{.14,.125,.17},{.90,.20,.83},{.02,.79,.94},{.93,.97,1},{.75,.72,.82},{.95,.97,1},{.86,.86,.91},{.67,.64,.73}},
{{.89,.94,.97},{.84,.91,.95},{.94,.98,1},{.90,.95,.98},{.83,.90,.95},{.91,.96,.99},{.95,.985,1},{.83,.91,.96},{.74,.84,.90},{.88,.94,.97},{.52,.61,.89},{.29,.74,.80},{.96,.99,1},{.40,.55,.65},{.12,.28,.34},{.19,.36,.43},{.25,.39,.47}}
{{.89,.94,.97},{.84,.91,.95},{.94,.98,1},{.90,.95,.98},{.83,.90,.95},{.91,.96,.99},{.95,.985,1},{.83,.91,.96},{.74,.84,.90},{.88,.94,.97},{.52,.61,.89},{.29,.74,.80},{.96,.99,1},{.40,.55,.65},{.12,.28,.34},{.17,.32,.39},{.20,.33,.41}}
};
NSColor *DYThemeSwatch(NSInteger index){static const double values[8][3]={{.30,.33,.38},{.28,.72,1},{.58,.52,1},{.30,.86,.52},{1,.61,.28},{.96,.77,.36},{.65,.38,1},{.82,.93,.98}};index=MAX(0,MIN(7,index));return rgb(values[index][0],values[index][1],values[index][2]);}
void DYSetThemeIndex(NSInteger index){if(index<0||index>7)return;[store().defaults setInteger:index forKey:@"themeIndex"];[store().defaults synchronize];[[NSNotificationCenter defaultCenter]postNotificationName:DYThemeDidChange object:nil];[[NSDistributedNotificationCenter defaultCenter]postNotificationName:distributedChange object:preferenceDomain userInfo:nil deliverImmediately:YES];}
@@ -43,7 +43,7 @@ NSDictionary<NSString *,NSColor *> *DYThemePalette(void){
for(NSInteger index=0;index<8;index++){
const double (*p)[3]=paletteRGB[index];NSMutableDictionary *d=[NSMutableDictionary dictionary];
for(int i=0;i<17;i++)d[[NSString stringWithFormat:@"slot%d",i]]=rgb(p[i][0],p[i][1],p[i][2]);
NSColor *accent=index==0?rgb(.72,.77,.84):index==1?rgb(.22,.67,1):index==6?rgb(.78,.75,.87):index==7?rgb(.23,.42,.54):DYThemeSwatch(index);
NSColor *accent=index==0?rgb(.72,.77,.84):index==1?rgb(.22,.67,1):index==6?rgb(.78,.75,.87):index==7?rgb(.20,.35,.44):DYThemeSwatch(index);
[d addEntriesFromDictionary:@{@"background":d[@"slot1"],@"card":d[@"slot3"],@"border":[accent colorWithAlphaComponent:.38],@"text":d[@"slot14"],@"secondary":d[@"slot16"],@"accent":accent,@"field":d[@"slot4"],@"headerTop":d[@"slot6"],@"headerBottom":d[@"slot7"],@"track":d[@"slot8"],@"activeTop":d[@"slot10"],@"activeBottom":d[@"slot11"],@"knob":d[@"slot12"]}];d[@"backgroundEnd"]=index==5?rgb(.085,.078,.060):d[@"background"];d[@"cardEnd"]=index==5?rgb(.085,.075,.052):d[@"card"];if(index==6){d[@"backgroundEnd"]=rgb(.065,.060,.080);d[@"cardEnd"]=rgb(.093,.090,.110);d[@"border"]=[rgb(.36,.33,.43)colorWithAlphaComponent:.40];} if(index==7){d[@"backgroundEnd"]=rgb(.90,.95,.98);d[@"cardEnd"]=rgb(.86,.93,.97);d[@"border"]=rgb(.55,.70,.79);}
[all addObject:[[d copy]autorelease]];
}palettes=[all copy];