Skip to content

Commit

Permalink
Ensure get_opacity returns float
Browse files Browse the repository at this point in the history
  • Loading branch information
3b1b committed Feb 21, 2024
1 parent 7b577e9 commit 5632fee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manimlib/mobject/mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ def get_color(self) -> str:
return rgb_to_hex(self.data["rgba"][0, :3])

def get_opacity(self) -> float:
return self.data["rgba"][0, 3]
return float(self.data["rgba"][0, 3])

def set_color_by_gradient(self, *colors: ManimColor) -> Self:
if self.has_points():
Expand Down

0 comments on commit 5632fee

Please sign in to comment.