authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-10-14 14:34:13 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-10-14 14:34:13 -07:00
logb561b5cf68d7d7120d5094fdfe7ad8f905759f92
tree63aee582dfc41f10c753e04526c0bf2d5c279384
parent1af3b0a4f587b3ae4c25fad867decc2fbcfdc4af

sRGB: needs the _x import


1 files changed, 3 insertions(+), 0 deletions(-)

sRGB.zig+3
......@@ -3,6 +3,7 @@
33const std = @import("std");
44const Self = @This();
55const color = @import("./mod.zig");
6const _x = @import("./_x.zig");
67
78r: u8, // red value
89g: u8, // green value
......@@ -72,6 +73,8 @@ pub fn format(x: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions,
7273 });
7374}
7475
76pub usingnamespace _x.mixin(@This(), .r, .g, .b);
77
7578pub fn to_linear_rgb(x: Self) color.LinearRgb {
7679 const lut = comptime blk: {
7780 @setEvalBranchQuota(10_000);