style: Z-Design V6 - Colores más vivos (30%/20%)
Cambios en deriveDarkPalette y derivePanelFrameColors: - focus_blend: 80 → 70 (30% color visible, antes 20%) - unfocus_blend: 88 → 80 (20% color visible, antes 12%) Objetivo: Mejor identificación visual de tipos de documento/cliente sin perder la estética oscura profesional. Tests actualizados para reflejar nuevos valores. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0125e2ca3e
commit
31362b6d48
1 changed files with 15 additions and 15 deletions
|
|
@ -1132,13 +1132,13 @@ fn deriveDarkPalette(base: Color) PanelColorScheme {
|
||||||
const gray = Color.rgb(128, 128, 128);
|
const gray = Color.rgb(128, 128, 128);
|
||||||
const dark_border = Color.rgb(60, 60, 65);
|
const dark_border = Color.rgb(60, 60, 65);
|
||||||
|
|
||||||
// Z-Design V5: Blend fijo sin compensación perceptual
|
// Z-Design V6: Más color visible para mejor identificación (2026-01-01)
|
||||||
// Focus: 20% color, Unfocus: 12% color (más visible que el anterior 4%)
|
// Focus: 30% color, Unfocus: 20% color
|
||||||
const focus_blend: u8 = 80; // 80% hacia negro = 20% color
|
const focus_blend: u8 = 70; // 70% hacia negro = 30% color
|
||||||
const unfocus_blend: u8 = 88; // 88% hacia negro = 12% color
|
const unfocus_blend: u8 = 80; // 80% hacia negro = 20% color
|
||||||
|
|
||||||
return .{
|
return .{
|
||||||
// Backgrounds: Z-Design V5 - blend fijo
|
// Backgrounds: Z-Design V6 - blend fijo con más color
|
||||||
.fondo_con_focus = base.blendTowards(black, focus_blend),
|
.fondo_con_focus = base.blendTowards(black, focus_blend),
|
||||||
.fondo_sin_focus = base.blendTowards(black, unfocus_blend),
|
.fondo_sin_focus = base.blendTowards(black, unfocus_blend),
|
||||||
|
|
||||||
|
|
@ -1379,8 +1379,8 @@ pub const DerivedPanelColors = struct {
|
||||||
pub fn derivePanelFrameColors(base: Color) DerivedPanelColors {
|
pub fn derivePanelFrameColors(base: Color) DerivedPanelColors {
|
||||||
const black = Color.soft_black;
|
const black = Color.soft_black;
|
||||||
|
|
||||||
// Blend fijo: 20% color con focus, 12% sin focus
|
// Z-Design V6: 30% color con focus, 20% sin focus (2026-01-01)
|
||||||
const focus_bg = base.blendTowards(black, 80); // 20% color
|
const focus_bg = base.blendTowards(black, 70); // 30% color
|
||||||
|
|
||||||
// Título: BLANCO con tinte sutil del color base para identidad
|
// Título: BLANCO con tinte sutil del color base para identidad
|
||||||
// El contraste viene del blanco, el tinte da coherencia visual
|
// El contraste viene del blanco, el tinte da coherencia visual
|
||||||
|
|
@ -1393,7 +1393,7 @@ pub fn derivePanelFrameColors(base: Color) DerivedPanelColors {
|
||||||
|
|
||||||
return .{
|
return .{
|
||||||
.focus_bg = focus_bg,
|
.focus_bg = focus_bg,
|
||||||
.unfocus_bg = base.blendTowards(black, 88), // 12% color
|
.unfocus_bg = base.blendTowards(black, 80), // 20% color
|
||||||
.border_focus = base,
|
.border_focus = base,
|
||||||
.border_unfocus = base.darken(30),
|
.border_unfocus = base.darken(30),
|
||||||
.title_color = title_color,
|
.title_color = title_color,
|
||||||
|
|
@ -1401,7 +1401,7 @@ pub fn derivePanelFrameColors(base: Color) DerivedPanelColors {
|
||||||
}
|
}
|
||||||
|
|
||||||
test "derivePanelFrameColors fixed blend" {
|
test "derivePanelFrameColors fixed blend" {
|
||||||
// Z-Design V5: All colors use same fixed blend (20% focus, 12% unfocus)
|
// Z-Design V6: All colors use same fixed blend (30% focus, 20% unfocus)
|
||||||
const blue = Color.rgb(0, 0, 255);
|
const blue = Color.rgb(0, 0, 255);
|
||||||
const derived = derivePanelFrameColors(blue);
|
const derived = derivePanelFrameColors(blue);
|
||||||
|
|
||||||
|
|
@ -1410,21 +1410,21 @@ test "derivePanelFrameColors fixed blend" {
|
||||||
try std.testing.expectEqual(blue.g, derived.border_focus.g);
|
try std.testing.expectEqual(blue.g, derived.border_focus.g);
|
||||||
try std.testing.expectEqual(blue.b, derived.border_focus.b);
|
try std.testing.expectEqual(blue.b, derived.border_focus.b);
|
||||||
|
|
||||||
// Focus bg: 20% blue + 80% soft_black(17,17,20)
|
// Focus bg: 30% blue + 70% soft_black(17,17,20)
|
||||||
// 0.20 * 255 + 0.80 * 20 = 51 + 16 = 67
|
// 0.30 * 255 + 0.70 * 20 = 76.5 + 14 = ~90
|
||||||
try std.testing.expect(derived.focus_bg.b > 55);
|
try std.testing.expect(derived.focus_bg.b > 75);
|
||||||
try std.testing.expect(derived.focus_bg.b < 85);
|
try std.testing.expect(derived.focus_bg.b < 105);
|
||||||
}
|
}
|
||||||
|
|
||||||
test "derivePanelFrameColors same blend for all colors" {
|
test "derivePanelFrameColors same blend for all colors" {
|
||||||
// V5: No perceptual correction - same blend for red and blue
|
// V6: No perceptual correction - same blend for red and blue
|
||||||
const blue = Color.rgb(0, 0, 255);
|
const blue = Color.rgb(0, 0, 255);
|
||||||
const red = Color.rgb(255, 0, 0);
|
const red = Color.rgb(255, 0, 0);
|
||||||
|
|
||||||
const blue_derived = derivePanelFrameColors(blue);
|
const blue_derived = derivePanelFrameColors(blue);
|
||||||
const red_derived = derivePanelFrameColors(red);
|
const red_derived = derivePanelFrameColors(red);
|
||||||
|
|
||||||
// Both should have ~20% of their primary color channel
|
// Both should have ~30% of their primary color channel
|
||||||
const blue_intensity = blue_derived.focus_bg.b;
|
const blue_intensity = blue_derived.focus_bg.b;
|
||||||
const red_intensity = red_derived.focus_bg.r;
|
const red_intensity = red_derived.focus_bg.r;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue