The generation of the colour numbers for Plaxis material datasets is based on a function that combines Red, Green and Blue (RGB) colour codes into one number, using a function that involves bit-shifting of the colour numbers.
The function is:
(B shift bits left: 16) + (G shift bits left: 8) + R
In Python, the example below will set the material colour of a material called Sand to an orange colour with R, G, B = 255, 174, 61
This code was made for PLAXIS 2D 2017 and PLAXIS 3D 2017 assuming we have a soil material named Sand.
g_i refers to the Plaxis Input global object.
Figure 1. Changing soil material colour to orange using Python
The above example is made for PLAXIS 2D 2017.00 and PLAXIS 3D 2017.00 using Python 3.4.x