# Filename: tri_get_rbg.py
# Purpose: Get the rgb value from a triangulation.
# Returns: List of integers.

from maptek import vulcan

tri = 'cube.00t' # input tri

with vulcan.triangulation(tri) as tri: # open tri as read
    assert tri.is_rgb(), 'Error: Triangulation is not rgb.'
    rgb = tri.get_rgb() # get rgb colour

    # do something with results...
    print(rgb)