pygame :: Color :: Class Color
[hide private]
[frames] | no frames]

Class Color

source code

object --+
         |
        Color

pygame.Color(name): Return Color pygame.Color(r, g, b, a): Return Color pygame.Color(rgbvalue): Return Color pygame object for color representations

Instance Methods [hide private]
 
__add__(x, y)
x+y
source code
 
__coerce__(x, y)
coerce(x, y)
source code
 
__delitem__(x, y)
del x[y]
source code
 
__div__(x, y)
x/y
source code
 
__eq__(x, y)
x==y
source code
 
__float__(x)
float(x)
source code
 
__floordiv__(x, y)
x//y
source code
 
__ge__(x, y)
x>=y
source code
 
__getitem__(x, y)
x[y]
source code
 
__getslice__(x, i, j)
x[i:j]
source code
 
__gt__(x, y)
x>y
source code
 
__hex__(x)
hex(x)
source code
 
__index__(...)
x[y:z] <==> x[y.__index__():z.__index__()]
source code
 
__int__(x)
int(x)
source code
 
__invert__(x)
~x
source code
 
__le__(x, y)
x<=y
source code
 
__len__(x)
len(x)
source code
 
__long__(x)
long(x)
source code
 
__lt__(x, y)
x<y
source code
 
__mod__(x, y)
x%y
source code
 
__mul__(x, y)
x*y
source code
 
__ne__(x, y)
x!=y
source code
a new object with type S, a subtype of T
__new__(T, S, ...) source code
 
__oct__(x)
oct(x)
source code
 
__radd__(x, y)
y+x
source code
 
__rdiv__(x, y)
y/x
source code
 
__repr__(x)
repr(x)
source code
 
__rfloordiv__(x, y)
y//x
source code
 
__rmod__(x, y)
y%x
source code
 
__rmul__(x, y)
y*x
source code
 
__rsub__(x, y)
y-x
source code
 
__setitem__(x, i, y)
x[i]=y
source code
 
__sub__(x, y)
x-y
source code
 
correct_gamma(...)
Color.correct_gamma (gamma): Return Color Applies a certain gamma value to the Color.
source code
 
normalize(...)
Color.normalize(): Return tuple Returns the normalized RGBA values of the Color.
source code
 
set_length(Color, len)
Set the number of elements in the Color to 1,2,3, or 4.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  a
Color.a: Return int Gets or sets the alpha value of the Color.
  b
Color.b: Return int Gets or sets the blue value of the Color.
  cmy
Color.cmy: Return tuple Gets or sets the CMY representation of the Color.
  g
Color.g: Return int Gets or sets the green value of the Color.
  hsla
Color.hsla: Return tuple Gets or sets the HSLA representation of the Color.
  hsva
Color.hsva: Return tuple Gets or sets the HSVA representation of the Color.
  i1i2i3
Color.i1i2i3: Return tuple Gets or sets the I1I2I3 representation of the Color.
  r
Color.r: Return int Gets or sets the red value of the Color.

Inherited from object: __class__

Method Details [hide private]

__getslice__(x, i, j)
(Slicling operator)

source code 

x[i:j]

Use of negative indices is not supported.

__new__(T, S, ...)

source code 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__repr__(x)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__