Home | Trees | Indices | Help |
|
---|
|
object --+ | internals._Objectype --+ | baseTypes._Type0 --+ | Color
Base Color
class wrapping NSColor
objects,
intended specifically to avoid fatal exceptions when accessing
non-applicable NSColor
attributes.
For example, getting the cyanComponent
of an RGB
NSColor
instance throws an NSException
, but
using Color.cyan for any non-CMYColor
safely returns None
. Likewise for other attributes.
Note:
Only pre-existing NSColor
can be wrapped, creating new
NSColor
is reserved for a future PyCocoa
release. Also, color conversion and any other "color math" are not supported (yet).
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Properties | |
alpha Get the alpha component ( float ) or
None if not applicable or ignored.
|
|
black Get the black component ( float ) or
None if not applicable.
|
|
blue Get the blue component ( float ) or
None if not applicable.
|
|
brightness Get the brightness component ( float ) or
None if not applicable.
|
|
colorSpace Get the space of this color ( str ).
|
|
cyan Get the cyan component ( float ) or
None if not applicable.
|
|
green Get the green component ( float ) or
None if not applicable.
|
|
hex Get the RGB components as hex ( int ) or
None if not applicable.
|
|
hue Get the hue component ( float ) or
None if not applicable.
|
|
magenta Get the magenta component ( float ) or
None if not applicable.
|
|
n Get the number of components of this color ( int ) or
None if not applicable.
|
|
name Get the given name of this color ( str ).
|
|
nsColor Get the name of the NSColor of this color
(str ).
|
|
red Get the red component ( float ) or
None if not applicable.
|
|
saturation Get the saturation component ( float ) or
None if not applicable.
|
|
white Get the white component ( float ) or
None if not applicable.
|
|
yellow Get the yellow component ( float ) or
None if not applicable.
|
|
Inherited from Inherited from Inherited from |
Method Details |
New Color
from an existing
Note:
If no |
Property Details |
alphaGet the alpha component (
|
blackGet the black component (
|
blueGet the blue component (
|
brightnessGet the brightness component (
|
colorSpaceGet the space of this color (
|
cyanGet the cyan component (
|
greenGet the green component (
|
hexGet the RGB components as hex (
|
hueGet the hue component (
|
magentaGet the magenta component (
|
nGet the number of components of this color (
|
nameGet the given name of this color (
|
nsColorGet the name of the
|
redGet the red component (
|
saturationGet the saturation component (
|
whiteGet the white component (
|
yellowGet the yellow component (
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Apr 8 11:26:16 2025 | http://epydoc.sourceforge.net |