| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | const std = @import("std"); |
| 4 | 4 | const Self = @This(); |
| 5 | 5 | const color = @import("./mod.zig"); |
| 6 | const _x = @import("./_x.zig"); |
| 6 | 7 | |
| 7 | 8 | r: u8, // red value |
| 8 | 9 | g: u8, // green value |
| ... | ... | @@ -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 | 78 | pub fn to_linear_rgb(x: Self) color.LinearRgb { |
| 76 | 79 | const lut = comptime blk: { |
| 77 | 80 | @setEvalBranchQuota(10_000); |