We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fd1479 commit 5d27d91Copy full SHA for 5d27d91
pygame_matplotlib/__init__.py
@@ -0,0 +1,9 @@
1
+import pygame
2
+
3
4
+def pygame_color_to_plt(color: pygame.Color):
5
+ """Convert a pygame Color to a matplot lib value."""
6
+ # Interval from 0 to 1 in matplotlib
7
+ return tuple(
8
+ value / 255.0 for value in [color.r, color.g, color.b, color.a]
9
+ )
0 commit comments