MCPcopy Create free account
hub / github.com/Kitware/VTK / GetRGBColor

Function GetRGBColor

Interaction/Style/Testing/Python/TestStyleTrackballActor.py:25–32  ·  view source on GitHub ↗

Return the red, green and blue components for a color as doubles.

(colorName)

Source from the content-addressed store, hash-verified

23
24# Make grabbing color a little easier
25def GetRGBColor(colorName):
26 '''
27 Return the red, green and blue components for a
28 color as doubles.
29 '''
30 rgb = [0.0, 0.0, 0.0] # black
31 vtkNamedColors().GetColorRGB(colorName, rgb)
32 return rgb
33
34# Create a sphere source and actor
35sphere = vtkSphereSource()

Callers 1

Calls 2

vtkNamedColorsFunction · 0.85
GetColorRGBMethod · 0.80

Tested by

no test coverage detected