color_to_threejs

compas_notebook.conversions.color_to_threejs(color)

Convert a COMPAS color to a PyThreeJS material.

Parameters:
colorcompas.colors.Color

The color to convert.

Returns:
three.MeshBasicMaterial

The PyThreeJS material.

Examples

>>> from compas.colors import Color
>>> color = Color.from_rgb255(255, 0, 0)
>>> color_to_threejs(color)  
MeshBasicMaterial(...)