Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the color of just one element in a Mermaid sequence diagram?

I'm using Mermaid to create a sequence diagram in Markdown. I'd like to highlight some of the participants and to gray some of the arrows.

I only see how to change the theme color, not how to change the color of a specific diagram element. Is it possible?

like image 383
neves Avatar asked Aug 25 '20 21:08

neves


People also ask

What is mermaid code?

About Mermaid. Mermaid lets you create diagrams and visualizations using text and code. It is a JavaScript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically. If you are familiar with Markdown you should have no problem learning Mermaid's Syntax ...


2 Answers

Now, it isn't possible to style sequence diagrams. There is an open issue in their bugtracker. Click the link and vote for it :-)

You can style other types of diagrams, as answered by @lutz-dieckhofer.

like image 113
neves Avatar answered Oct 27 '22 05:10

neves


Take a look at the Mermaid documentation, there is also a paragraph about the styling of individual nodes:

https://mermaid-js.github.io/mermaid/#/flowchart?id=styling-and-classes

I hope this what you are looking for.

like image 28
Lutz Dieckhöfer Avatar answered Oct 27 '22 03:10

Lutz Dieckhöfer