diff options
Diffstat (limited to 'src/colors.zig')
| -rw-r--r-- | src/colors.zig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/colors.zig b/src/colors.zig index bc59c334..e679f4a5 100644 --- a/src/colors.zig +++ b/src/colors.zig @@ -281,6 +281,17 @@ pub const Theme = struct { rail_px: ?u8 = null, }; +/// The ink a syntax class is drawn in; a byte of none keeps its text's own. +pub fn synInk(th: *const Theme, sy: @import("syntax.zig").Syn) ?[3]u8 { + return switch (sy) { + .none => null, + .keyword => th.kw, + .string => th.str, + .number => th.num, + .comment => th.comment, + }; +} + /// One family, its twelve backgrounds a theme each (`curated`). const seoul256 = @import("themes/seoul256.zig"); |
