| ... | @@ -3,6 +3,7 @@ | ... | @@ -3,6 +3,7 @@ |
| 3 | const std = @import("std"); | 3 | const std = @import("std"); |
| 4 | const Self = @This(); | 4 | const Self = @This(); |
| 5 | const color = @import("./mod.zig"); | 5 | const color = @import("./mod.zig"); |
| | 6 | const _x = @import("./_x.zig"); |
| 6 | | 7 | |
| 7 | r: u8, // red value | 8 | r: u8, // red value |
| 8 | g: u8, // green value | 9 | g: u8, // green value |
| ... | @@ -72,6 +73,8 @@ pub fn format(x: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions, | ... | @@ -72,6 +73,8 @@ pub fn format(x: Self, comptime fmt: []const u8, options: std.fmt.FormatOptions, |
| 72 | }); | 73 | }); |
| 73 | } | 74 | } |
| 74 | | 75 | |
| | 76 | pub usingnamespace _x.mixin(@This(), .r, .g, .b); |
| | 77 | |
| 75 | pub fn to_linear_rgb(x: Self) color.LinearRgb { | 78 | pub fn to_linear_rgb(x: Self) color.LinearRgb { |
| 76 | const lut = comptime blk: { | 79 | const lut = comptime blk: { |
| 77 | @setEvalBranchQuota(10_000); | 80 | @setEvalBranchQuota(10_000); |