MATLAB: Can I change the color of a block in SIMULINK to match its color in the library

blockcolormatchsimulinkupdate

I would like to change the color of a block in a library and have the colors of the blocks used in my models updated automatically to match the colors in the library.

Best Answer

There is no way to propagate the block colors from the library into the blocks in the model.
To work around this issue, you can either change the color of the block programmatically using the SET_PARAM function.
For example, the following command programmatically sets the background color of the currently selected system or subsystem to a light green color:
set_param(gcs, 'ScreenColor', '[0.3, 0.9, 0.5]')