from colorspace import sRGB
# Constructing color object with one single color via float
sRGB(1., 0.3, 0.5)sRGB 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, RGB, hexcols. polarLAB and polarLUV.
sRGB(R, G, B, alpha=None, gamma=None)
Rint, float, list, numpy.array
[0., 1.]).
Gint, float, list, numpy.array
[0., 1.]).
Bint, float, list, numpy.array
[0., 1.]).
alphaNone, float, list, numpy.array
[0., 1.]) where 0. equals full transparency, 1. full opacity. If None (default) no transparency is added.
gammaNone, float
None (default) the default gamma value is used. Can be specified to overwrite the default.
sRGB.colors(fixup=True, rev=False)
sRGB.dropalpha()
sRGB.get(dimname=None)
sRGB.get_whitepoint()
sRGB.hasalpha()
sRGB.hclplot(**kwargs)
sRGB.length()
sRGB.set(**kwargs)
sRGB.set_whitepoint(**kwargs)
sRGB.specplot(**kwargs)
sRGB.swatchplot(**kwargs)
sRGB.to(to, fixup=True)
from colorspace import sRGB
# Constructing color object with one single color via float
sRGB(1., 0.3, 0.5)sRGB color object (1 colors)
R G B
1: 1.00 0.30 0.50
sRGB color object (2 colors)
R G B
1: 1.00 0.50 0.00
0.80 0.50 0.20