The CFA Mermaid look

One theme for flowcharts and charts. The lesson stores meaning; the app applies colour and type.

1. Type: SN Pro, the app's face

Bond price between coupon datesDiscount the fractional period• Use second equation"SN Pro", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif

Flowchart labels 15px, chart titles 18px, axis labels 13px. Same face in every diagram type.

2. Palette: seven node classes, and charts borrow their ink

:::inputgiven data, an assumption, a market fact#EEFAFF · #0369A1
:::decisiona question or a test the candidate applies#FEF8EC · #854D0E
:::stepa calculation or procedural step#F6F5F5 · #525252
:::rulea Standard, regulation, formula or principle#F7F5FD · #6B21A8
:::riska violation, trap, loss or penalty#FDF4F3 · #B91C1C
:::outcomea conclusion, recommendation or result#F1FCF5 · #166534
:::partyan investor, issuer, manager or counterparty#FFF7ED · #C2410C

Chart series, in order: #0369A1   #166534   #854D0E   #B91C1C — the text colours of input, outcome, decision and risk. Chart panel: the step fill.

3. A real flowchart: stored text, and what the learner sees

Stored in the lesson (meaning only)

flowchart TD
A["<b>📜 Read settlement</b><br><span class='detail' style='display:block; text-align:left'>• Check coupon timing</span>"]:::input --> B["<b>⚖️ Set yield basis</b><br><span class='detail' style='display:block; text-align:left'>• Match cash-flow basis</span>"]:::step
B --> C["<b>📜 List cash flows</b><br><span class='detail' style='display:block; text-align:left'>• List future receipts</span>"]:::step
C --> D{"<b>❓ Between coupons?</b><br><span class='detail' style='display:block; text-align:left'>• Test coupon timing</span>"}:::decision
D -->| No | E["<b>🧮 Discount full periods</b><br><span class='detail' style='display:block; text-align:left'>• Use first equation</span>"]:::step
D -->| Yes | F["<b>🧮 Discount fractional period</b><br><span class='detail' style='display:block; text-align:left'>• Use second equation</span>"]:::step
E --> G["<b>✅ Choose price quote</b><br><span class='detail' style='display:block; text-align:left'>• Clean excludes AI</span><br><span class='detail' style='display:block; text-align:left'>• Dirty includes AI</span>"]:::outcome
F --> H["<b>🧮 Add accrued interest</b><br><span class='detail' style='display:block; text-align:left'>• Include seller coupon</span>"]:::step
H --> G

Rendered by the app

What the renderer adds

classDef input fill:#EEFAFF,stroke:#DAF3FF,stroke-width:1.5px,rx:12,ry:12,color:#0369A1
classDef decision fill:#FEF8EC,stroke:#FBECCA,stroke-width:1.5px,rx:12,ry:12,color:#854D0E
classDef step fill:#F6F5F5,stroke:#E7E6E6,stroke-width:1.5px,rx:12,ry:12,color:#525252
classDef rule fill:#F7F5FD,stroke:#F0EDFA,stroke-width:1.5px,rx:12,ry:12,color:#6B21A8
classDef risk fill:#FDF4F3,stroke:#FCE6E4,stroke-width:1.5px,rx:12,ry:12,color:#B91C1C
classDef outcome fill:#F1FCF5,stroke:#BEF4D8,stroke-width:1.5px,rx:12,ry:12,color:#166534
classDef party fill:#FFF7ED,stroke:#FFEED5,stroke-width:1.5px,rx:12,ry:12,color:#C2410C

Prepended to every flowchart at render time, plus mermaid.initialize(CFA_MERMAID_INIT) below. Change these, and every lesson changes.

4. A real chart: same file, same theme

Stored in the lesson

xychart-beta
    title "Illustrative: Price against annual YTM"
    x-axis ["0.04", "0.05", "0.06"]
    y-axis "Price level" 1000.00 --> 1056.01
    line [1056.01, 1027.54, 1000.00]

Rendered by the app

5. The initialise object

{
  "startOnLoad": false,
  "securityLevel": "loose",
  "theme": "base",
  "themeVariables": {
    "fontFamily": "\"SN Pro\", \"Nunito\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
    "fontSize": "15px",
    "primaryColor": "#EEFAFF",
    "primaryTextColor": "#15202B",
    "primaryBorderColor": "#DAF3FF",
    "lineColor": "#5B6B7B",
    "secondaryColor": "#F1FCF5",
    "tertiaryColor": "#FEF8EC",
    "xyChart": {
      "plotColorPalette": "#0369A1, #166534, #854D0E, #B91C1C",
      "backgroundColor": "#F6F5F5",
      "titleColor": "#15202B",
      "xAxisLabelColor": "#525252",
      "xAxisTitleColor": "#525252",
      "xAxisLineColor": "#94A3B8",
      "xAxisTickColor": "#94A3B8",
      "yAxisLabelColor": "#525252",
      "yAxisTitleColor": "#525252",
      "yAxisLineColor": "#94A3B8",
      "yAxisTickColor": "#94A3B8"
    }
  },
  "fontFamily": "\"SN Pro\", \"Nunito\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
  "flowchart": {
    "htmlLabels": true,
    "curve": "basis",
    "padding": 12,
    "nodeSpacing": 40,
    "rankSpacing": 44
  },
  "xyChart": {
    "width": 700,
    "height": 420,
    "titleFontSize": 18,
    "titlePadding": 10,
    "xAxis": {
      "labelFontSize": 13,
      "titleFontSize": 14,
      "labelPadding": 6,
      "titlePadding": 6,
      "showAxisLine": true,
      "axisLineWidth": 1
    },
    "yAxis": {
      "labelFontSize": 13,
      "titleFontSize": 14,
      "labelPadding": 6,
      "titlePadding": 6,
      "showAxisLine": true,
      "axisLineWidth": 1
    },
    "plotReservedSpacePercent": 55
  }
}