Skip to content

Commit

Permalink
color: let is_transparent() return false if alpha channel is < 255
Browse files Browse the repository at this point in the history
  • Loading branch information
larpon committed Oct 25, 2023
1 parent 56c57ee commit 3d9500f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/color.v
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub mut:
}

pub fn (c &Color) is_transparent() bool {
return c.a == 0
return c.a < 255
}

pub fn (c &Color) is_opaque() bool {
Expand Down

0 comments on commit 3d9500f

Please sign in to comment.