跳转至

Diagram Color Convention#

Diagrams are used to summarize relationships, dependencies, and lifecycle flows that are easier to understand visually than through text alone. To make these diagrams easier to understand, colors are also used to distinguish the role of each element, such as the primary entity, related entities, contextual configuration, optional objects, and lifecycle states.

The diagram below illustrates the standard role-based palette used for entity relationship diagrams:

flowchart LR
  E["Primary entity"]:::entity
  B["Business Data"]:::business
  L["Linked entity"]:::linked
  N["Non-Business Data"]:::nonbusiness
  C["Context / configuration"]:::context
  O["Optional object"]:::optional

  E --- B
  E --- L
  B --- N
  C --- E
  O --- E

  classDef entity fill:#FB9F53,stroke:#FB9F53,color:#000
  classDef business fill:#65CDE8,stroke:#65CDE8,color:#000
  classDef linked fill:#FCD5B5,stroke:#FCD5B5,color:#000
  classDef nonbusiness fill:#B7DEE8,stroke:#B7DEE8,color:#000
  classDef context fill:#B9CDE5,stroke:#B9CDE5,color:#000
  classDef optional fill:#B7DEE8,stroke:#65CDE8,color:#000,stroke-width:1px,stroke-dasharray: 5 5
Label Description
Primary entity The main entity of the diagram. All other elements relate directly or indirectly to this entity.
Business Data A MES Business Data entity that has a direct relationship with the primary entity.
Linked entity An associated entity that connects to the primary entity or to a related Business Data entity.
Non-Business Data A supporting entity associated with the primary entity that is not classified as Business Data.
Context/configuration A configuration or setup object that provides context for the primary entity, but is not directly part of it.
Optional object An optional object for a given entity instance.

Table: Entity diagram labels and descriptions

Other diagram types use a different color convention. Instead of distinguishing entity roles, these diagrams use color to represent states within a State Model or lifecycle:

  • Active or in‑progress states use the initial state color.
  • Terminal or final states use the final state color.

The diagram below illustrates a simple lifecycle workflow, using the standard color convention to distinguish active states from terminal states:

graph TD
    A1[Created] -->|Enqueue| A2[Queued]

    A2 -->|Complete| A3[Completed]
    A2 -->|Cancel| A4[Canceled]

    classDef mermaid_initial_state fill:#d7e4bd,stroke:#92d050,stroke-width:3px,color:#000;
    classDef mermaid_final_state fill:#a7e2f2,stroke:#65CDE8,stroke-width:3px,color:#000;

    class A1,A2 mermaid_initial_state;
    class A3,A4 mermaid_final_state;

Note

Some diagrams may vary slightly depending on their purpose or usage, so the colors should be treated as a visual guide.