source:
nagslang/utils.py
@
235:831e4f6b3d18
Last change on this file since 235:831e4f6b3d18 was 29:58505d3482b6, checked in by , 7 years ago | |
---|---|
File size: 276 bytes |
Line | |
---|---|
1 | import pygame |
2 | |
3 | |
4 | def convert_colour(colour): |
5 | if isinstance(colour, pygame.Color): |
6 | return colour |
7 | if isinstance(colour, tuple): |
8 | return pygame.Color(*colour) |
9 | if isinstance(colour, basestring): |
10 | return pygame.Color(colour) |
11 | raise ValueError() |
Note: See TracBrowser
for help on using the repository browser.