colour_visuals.VisualRGBColourspace3D#
- class colour_visuals.VisualRGBColourspace3D(colourspace: RGB_Colourspace | str | Sequence[RGB_Colourspace | LiteralRGBColourspace | str] = 'sRGB', model: LiteralColourspaceModel | str = 'CIE xyY', colour: ArrayLike | None = None, opacity: float = 1, material: Type[gfx.MeshAbstractMaterial] = gfx.MeshBasicMaterial, wireframe: bool = False, segments: int = 16, size: float = 1, **kwargs: Any)[source]#
Bases:
MixinPropertyColourspace,MixinPropertyModel,MixinPropertyColour,MixinPropertyOpacity,MixinPropertyThickness,MixinPropertyTypeMaterial,MixinPropertyWireframe,MixinPropertySegments,MixinPropertySize,MixinPropertyKwargs,VisualCreate a 3D RGB colourspace volume visual.
- Parameters:
colourspace (RGB_Colourspace | str | Sequence[RGB_Colourspace | LiteralRGBColourspace | str]) – RGB colourspace to plot the gamut of.
colourspaceselements can be of any type or form supported by thecolour.plotting.common.filter_RGB_colourspaces()definition.model (LiteralColourspaceModel | str) – Colourspace model, see
colour.COLOURSPACE_MODELSattribute for the list of supported colourspace models.colour (ArrayLike | None) – Colour of the visual, if None, the colour is computed from the visual geometry.
opacity (float) – Opacity of the visual.
thickness – Thickness of the visual lines.
material (Type[gfx.MeshAbstractMaterial]) – Material used to surface the visual geometry.
wireframe (bool) – Whether to render the visual as a wireframe, i.e., only render edges.
segments (int) – Edge segments count for the RGB colourspace cube.
size (float) – Size of the underlying RGB colourspace cube; used for plotting HDR related volumes.
kwargs (Any) – See the documentation of the supported conversion definitions.
Attributes
colourspacemodelcolouropacitythicknesstype_materialwireframesegmentssize
Methods
Examples
>>> import os >>> import pylinalg as la >>> from colour.utilities import suppress_stdout >>> from wgpu.gui.auto import WgpuCanvas >>> with suppress_stdout(): ... canvas = WgpuCanvas(size=(960, 540)) ... scene = gfx.Scene() ... scene.add( ... gfx.Background( ... None, gfx.BackgroundMaterial(np.array([0.18, 0.18, 0.18])) ... ) ... ) ... visual = VisualRGBColourspace3D(wireframe=True) ... visual.local.rotation = la.quat_from_euler((-np.pi / 4, 0), order="XY") ... camera = gfx.PerspectiveCamera(50, 16 / 9) ... camera.show_object(visual, up=np.array([0, 0, 1]), scale=1.25) ... scene.add(visual) ... if os.environ.get("CI") is None: ... gfx.show(scene, camera=camera, canvas=canvas)
- __init__(colourspace: RGB_Colourspace | str | Sequence[RGB_Colourspace | LiteralRGBColourspace | str] = 'sRGB', model: LiteralColourspaceModel | str = 'CIE xyY', colour: ArrayLike | None = None, opacity: float = 1, material: Type[gfx.MeshAbstractMaterial] = gfx.MeshBasicMaterial, wireframe: bool = False, segments: int = 16, size: float = 1, **kwargs: Any) None[source]#
- Parameters:
- Return type:
None