Simulink sample time colors in 2025b
42 views (last 30 days)
Show older comments
I need to transfer a 2023a Simulink design to 2025b version. Everything goes well except the sample time colors. I have 8 colors in 2023a design and they are completely screwed up in 2025b version.
2025b supports on;y 3 colors by default. I ran a script that setup 8 colors in 2025b. However, during conversion from 2023a to 2025b, new colors are still srewed up.
My question is: what do I need to do to make sample rate colors in 2025b Simulink look the same as in 2023a design?
Thank you,
alex
0 Comments
Answers (2)
Leepakshi
on 13 Nov 2025 at 14:38
Hi Alex,
Starting in MATLAB R2023b, you can programmatically view and customize Simulink’s sample time colors using the "Simulink.SampleTimeColors.Palette" class. This allows you to get the current color palette, set a new palette with your preferred color order and number of colors, and reset to the default palette—all via simple MATLAB commands. For example, you can use "Simulink.SampleTimeColors.Palette.getActive" to view the current colors, and "Simulink.SampleTimeColors.Palette.setActive" to apply a custom palette, making it much easier to manage and migrate sample time color settings across Simulink versions.
Refer to below documentation for methods possible under sampletimecolors:
Thanks
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!