Skip to content

Commit

Permalink
colorspace: fix Rgba.fromHex
Browse files Browse the repository at this point in the history
  • Loading branch information
arrufat committed Nov 9, 2024
1 parent 5b25e52 commit 07d5cf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/colorspace.zig
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ pub const Rgba = packed struct {
}

/// Constructs a RGBA color from a hex value.
pub fn fromHex(hex_code: u32) Rgb {
pub fn fromHex(hex_code: u32) Rgba {
return .{
.r = @intCast((hex_code >> (8 * 3)) & 0x0000ff),
.g = @intCast((hex_code >> (8 * 2)) & 0x0000ff),
Expand Down

0 comments on commit 07d5cf5

Please sign in to comment.