Skip to content

Commit

Permalink
Use oygame.colordict instead of Color objects
Browse files Browse the repository at this point in the history
  • Loading branch information
lordmauve committed Oct 30, 2021
1 parent 92d561c commit 005dbf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pgzero/screen.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import numpy as np
import pygame
import pygame.draw
from pygame.colordict import THECOLORS

from . import ptext
from .rect import RECT_CLASSES, ZRect
Expand All @@ -22,7 +23,7 @@ def round_pos(pos):
def make_color(arg):
if isinstance(arg, tuple):
return arg
return tuple(pygame.Color(arg))
return THECOLORS[arg]


class SurfacePainter:
Expand Down

0 comments on commit 005dbf5

Please sign in to comment.