Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Change Simulink block colors (Display, MATLAB Function)

Asked by Andrea Gallivanoni on 4 Feb 2013

I know that it is possible to change both the Background Color and the Foreground Color of Simulink blocks. However, for some block types, such as the Display block and the MATLAB Function block, I was not able to change the displayed string color, that always remains black. Is there a way to change those colors as well?


Andrea Gallivanoni on 5 Feb 2013

In the Display block, the value to be displayed, enclosed in a rectangle inside the block. Changing the foreground color only changes the block outline and the block name, but not the value. For the MATLAB Function blocks, the port names remain black whatever color is selected as foreground color.

Kaustubha Govind

Kaustubha Govind (view profile)

on 5 Feb 2013

Andrea: I don't think what you're asking for is currently possible, but you may want to check with MathWorks Tech Support and put in an enhancement request if the functionality doesn't exist already.

Andrea Gallivanoni on 6 Feb 2013

Thanks Kaustubha for your answer. Up until Simulink's previous version it was possible, at least for the Display block: changing the foreground color changed the color of the displayed value as well. No such luck for the MATLAB Function block though. Anyway, I'll contact Mathworks tech support on this.



1 Answer

Answer by Ryan G

Ryan G (view profile)

on 5 Feb 2013

You could probably work something out with this custom display on the file exchange along with (<> text2im> Convert the string to an image and perform something like IMSHOW on the block mask.


Ryan G

Ryan G (view profile)

Contact us