summaryrefslogtreecommitdiff
path: root/core/colors.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/colors.zig')
-rw-r--r--core/colors.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/colors.zig b/core/colors.zig
index eefb2b67..f9de60c9 100644
--- a/core/colors.zig
+++ b/core/colors.zig
@@ -1381,6 +1381,10 @@ pub const Roles = struct {
/// The letters a query matched: an ink, never a ground, 4.5:1 on every
/// tag ground and on the selection.
match: [3]u8,
+ /// A symbol's kind mark in a list (`t`, `f`, UX DESIGN N4): the
+ /// keyword's ink, which spells a kind in the text (`struct`, `fn`),
+ /// 4.5:1 on every tag ground and on the selection.
+ kind: [3]u8,
/// The body's places and a preview's landing line, and the current
/// one (its matched span): grounds off the page, its ink on them 4.5:1.
hit: [3]u8,
@@ -1429,6 +1433,7 @@ pub const Roles = struct {
const tag_grounds = [_][3]u8{ plain, focused, reading, r.selected[0].ground, r.selected[1].ground, r.selected[2].ground, r.selected[3].ground };
r.key = pushAway(th.box, &tag_grounds, ink_floor);
r.match = pushAway(matchHue(th), &tag_grounds, ink_floor);
+ r.kind = pushAway(th.kw, &tag_grounds, ink_floor);
const page = th.bg orelse null_page;
const body_ink = th.fg orelse th.tag_fg;
const dark = relativeLuminance(page) < 0.18;
@@ -2379,6 +2384,7 @@ test "every theme's walk UI roles meet their floors on every ground they are dra
}
try checks.append(a, .{ .what = "key", .got = leastContrast(r.key, &tags), .floor = @min(Roles.ink_floor, Reach.of(&tags)) });
try checks.append(a, .{ .what = "match", .got = leastContrast(r.match, &tags), .floor = @min(Roles.ink_floor, Reach.of(&tags)) });
+ try checks.append(a, .{ .what = "kind", .got = leastContrast(r.kind, &tags), .floor = @min(Roles.ink_floor, Reach.of(&tags)) });
for (r.tag) |inks| {
try checks.append(a, .{ .what = "rule", .got = contrast(inks.rule, inks.ground), .floor = Roles.rule_floor });
try checks.append(a, .{ .what = "rule ceiling", .got = Roles.rule_ceiling - contrast(inks.rule, inks.ground), .floor = 0 });