[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] using Color() with HSVA
- To: pygame-users@xxxxxxxx
- Subject: [pygame] using Color() with HSVA
- From: Jake b <ninmonkeys@xxxxxxxxx>
- Date: Fri, 30 Jul 2010 02:43:25 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 30 Jul 2010 03:43:50 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=ZTzsjze7ANFp/Z199Ixtc2ujHPTIy79WmUcS8YtA/xI=; b=KHuKz7obySss1bZcE/Er2sem396Co1j04/0PISvlCIBVvZ95SqrLQuofE0Ncn0BQLl euv3mHfDEjvAQg/waphM2e8mKN9wSQPms0EIk6m2cZqQaaUfGvy0Blz6uXZ1onhPCe9a 4ojNaOo5YW1iX8tBLXVIjX/I9lk/Gtik53/Es=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=fXaohS8c8JOoHglBjW4K0XX9wkluyQQNtq1DEEXq0+PXhkofnvRQELyalX01r5ydhO R3ujBObZUKJ9qzZ4nmVPGq53lBQJfOPJBMQqeMWSedw6eYUVNK0P9kv3c+OxDI0RW42n 9VPhvYKtInr5b1MEoDLN3AwXiD+bcplFuc1fc=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
atm I have to use the cookbook to get RGB from HSV color.
Docs say:
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