| author | |
| committer | |
| log | 5aaaebb7f77a6737c10dd7be77926019e0f32ab4 |
| tree | abed94448e12e20b4d758d8dc6f3be25f1f8c2c0 |
| parent | 36f4989aee0406ab6ea7802fdac1fe8a45ea89d7 |
4 files changed, 17 insertions(+), 17 deletions(-)
CMYK.zig+5-5| ... | @@ -4,11 +4,11 @@ const std = @import("std"); | ... | @@ -4,11 +4,11 @@ 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 | 6 | ||
| 7 | c: f32, // cyan | 7 | c: f32, // cyan [ 0 .. 1 ] |
| 8 | m: f32, // magenta | 8 | m: f32, // magenta [ 0 .. 1 ] |
| 9 | y: f32, // yellow | 9 | y: f32, // yellow [ 0 .. 1 ] |
| 10 | k: f32, // black | 10 | k: f32, // black [ 0 .. 1 ] |
| 11 | a: f32, // alpha | 11 | a: f32, // alpha [ 0 .. 1 ] |
| 12 | 12 | ||
| 13 | pub fn initCMYKA(c: f32, m: f32, y: f32, k: f32, a: f32) Self { | 13 | pub fn initCMYKA(c: f32, m: f32, y: f32, k: f32, a: f32) Self { |
| 14 | std.debug.assert(c >= 0.0 and c <= 1.0); | 14 | std.debug.assert(c >= 0.0 and c <= 1.0); |
HSL.zig+4-4| ... | @@ -5,10 +5,10 @@ const Self = @This(); | ... | @@ -5,10 +5,10 @@ const Self = @This(); |
| 5 | const color = @import("./mod.zig"); | 5 | const color = @import("./mod.zig"); |
| 6 | const _x = @import("./_x.zig"); | 6 | const _x = @import("./_x.zig"); |
| 7 | 7 | ||
| 8 | h: f32, // hue | 8 | h: f32, // hue [ 0 .. 1 ] |
| 9 | s: f32, // saturation | 9 | s: f32, // saturation [ 0 .. 1 ] |
| 10 | l: f32, // luminance | 10 | l: f32, // luminance [ 0 .. 1 ] |
| 11 | a: f32, // alpha | 11 | a: f32, // alpha [ 0 .. 1 ] |
| 12 | 12 | ||
| 13 | pub fn initHSLA(h: f32, s: f32, l: f32, a: f32) Self { | 13 | pub fn initHSLA(h: f32, s: f32, l: f32, a: f32) Self { |
| 14 | std.debug.assert(h >= 0.0 and h <= 1.0); | 14 | std.debug.assert(h >= 0.0 and h <= 1.0); |
HSV.zig+4-4| ... | @@ -5,10 +5,10 @@ const Self = @This(); | ... | @@ -5,10 +5,10 @@ const Self = @This(); |
| 5 | const color = @import("./mod.zig"); | 5 | const color = @import("./mod.zig"); |
| 6 | const _x = @import("./_x.zig"); | 6 | const _x = @import("./_x.zig"); |
| 7 | 7 | ||
| 8 | h: f32, // hue | 8 | h: f32, // hue [ 0 .. 1 ] |
| 9 | s: f32, // saturation | 9 | s: f32, // saturation [ 0 .. 1 ] |
| 10 | v: f32, // value | 10 | v: f32, // value [ 0 .. 1 ] |
| 11 | a: f32, // alpha | 11 | a: f32, // alpha [ 0 .. 1 ] |
| 12 | 12 | ||
| 13 | pub fn initHSVA(h: f32, s: f32, v: f32, a: f32) Self { | 13 | pub fn initHSVA(h: f32, s: f32, v: f32, a: f32) Self { |
| 14 | std.debug.assert(h >= 0.0 and h <= 1.0); | 14 | std.debug.assert(h >= 0.0 and h <= 1.0); |
LinearRgb.zig+4-4| ... | @@ -6,10 +6,10 @@ const color = @import("./mod.zig"); | ... | @@ -6,10 +6,10 @@ const color = @import("./mod.zig"); |
| 6 | const _x = @import("./_x.zig"); | 6 | const _x = @import("./_x.zig"); |
| 7 | const vec4 = @Vector(4, f32); | 7 | const vec4 = @Vector(4, f32); |
| 8 | 8 | ||
| 9 | r: f32, // red | 9 | r: f32, // red [ 0 .. 1] |
| 10 | g: f32, // green | 10 | g: f32, // green [ 0 .. 1] |
| 11 | b: f32, // blue | 11 | b: f32, // blue [ 0 .. 1] |
| 12 | a: f32, // alpha | 12 | a: f32, // alpha [ 0 .. 1] |
| 13 | 13 | ||
| 14 | pub fn initRGBA(r: f32, g: f32, b: f32, a: f32) Self { | 14 | pub fn initRGBA(r: f32, g: f32, b: f32, a: f32) Self { |
| 15 | std.debug.assert(r >= 0.0 and r <= 1.0); | 15 | std.debug.assert(r >= 0.0 and r <= 1.0); |