diff --git a/sRGB.zig b/sRGB.zig index e16286a55d4380167417ee38d184f9f4ed9d4b43..946d6552ca29bbbb13750103dce7be9bc18bdcd9 100644 --- a/sRGB.zig +++ b/sRGB.zig @@ -3,6 +3,7 @@ const std = @import("std"); const Self = @This(); const color = @import("./mod.zig"); +const _x = @import("./_x.zig"); r: u8, // red value g: u8, // green value @@ -72,6 +73,8 @@ pub fn format(x: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions, }); } +pub usingnamespace _x.mixin(@This(), .r, .g, .b); + pub fn to_linear_rgb(x: Self) color.LinearRgb { const lut = comptime blk: { @setEvalBranchQuota(10_000);