from colorspace import RGB
# Constructing color object with one single color via float
1., 0.3, 0.5) RGB(
RGB color object (1 colors)
R G B
1: 1.00 0.30 0.50
Documentation built with Python 3.11.10
, pyp2qmd 0.1.1
and quarto 1.5.57
on GitHub.
Allows conversions to: CIELAB, CIELUV, CIEXYZ, HLS, HSV, hexcols. polarLAB, polarLUV and sRGB.
RGB(R, G, B, alpha=None)
R
int, float, list, numpy.array
[0., 1.]
).
G
int, float, list, numpy.array
[0., 1.]
).
B
int, float, list, numpy.array
[0., 1.]
).
alpha
None, float, list, numpy.array
[0., 1.]
) where 0.
equals full transparency, 1.
full opacity. If None
(default) no transparency is added.
RGB.colors(fixup=True, rev=False)
RGB.dropalpha()
RGB.get(dimname=None)
RGB.get_whitepoint()
RGB.hasalpha()
RGB.hclplot(**kwargs)
RGB.length()
RGB.set(**kwargs)
RGB.set_whitepoint(**kwargs)
RGB.specplot(**kwargs)
RGB.swatchplot(**kwargs)
RGB.to(to, fixup=True)
from colorspace import RGB
# Constructing color object with one single color via float
RGB(1., 0.3, 0.5)
RGB color object (1 colors)
R G B
1: 1.00 0.30 0.50
RGB color object (2 colors)
R G B
1: 1.00 0.50 0.00
0.80 0.50 0.20