[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] using Color() with HSVA



atm I have to use the cookbook to get RGB from HSV color.

Docs say:
Color.hsva
Gets or sets the HSVA representation of the Color.
Color.hsva: Return tuple

This fails:
>>> pygame.ver
'1.9.1release-svn2575'
>>> a2 = Color(1,2,4,5)
>>> type(a2)
<type 'pygame.Color'>
>>> a2
(1, 2, 4, 5)
>>> a2.r, a2.a
1, 5
>>> a2.hsva
(220.0, 75.0, 1.5686274509803921, 1.9607843137254901)
>>> a2.hsva(1,1,1,1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object is not callable

--
Jake