wheel
palettes.wheel
HSV and RGB color-wheel palettes.
Build a smooth color wheel or fixed-saturation HSV ramp. Named Windows
16-color attributes (RED, BLACK, etc.) are available on each
instance.
Example
from palettes import get_palette palette = get_palette(name="wheel", length=256, saturation=1.0) palette[0] palette.RED
WheelPalette(name='', color_depth=16, swapped=False, cached=True, length=256, saturation=1.0, value=None)
Bases: Palette
Color wheel or HSV ramp palette.
With saturation=None and value=None (the default when both are
omitted), indices follow a classic RGB color wheel. When either
saturation or value is set, indices map linearly through hue at
fixed saturation and value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
Prefix for :attr: |
''
|
|
color_depth
|
Output format; see :class: |
16
|
|
swapped
|
Byte-swap 16-bit colors when |
False
|
|
cached
|
Memoize index lookups when |
True
|
|
length
|
Number of colors in the wheel (default |
256
|
|
saturation
|
HSV saturation in |
1.0
|
|
value
|
HSV value in |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |