excalidraw / mermaid-to-excalidraw

Generate Excalidraw diagrams from Mermaid
https://mermaid-to-excalidraw.vercel.app
MIT License
265 stars 46 forks source link

Colours are not rendered in the Excalidraw window #69

Closed axilis-marko closed 2 months ago

axilis-marko commented 3 months ago

I've created a Mermaid file with colours defined

graph TD
    A[A]
    B[B]
    A --> B
    B --> C[C]
    B --> D[D]
    B --> E[E]
    B --> F[F]
    B --> G[G]
    B --> H[H]
    B --> I[I]
    B --> J[J]
    H --> K[K]
    H --> L[L]
    H --> M[M]

    classDef reskov fill:#f96,stroke:#333,stroke-width:2px;
    classDef anvar fill:#ff9,stroke:#333,stroke-width:2px;
    classDef frontend fill:#9cf,stroke:#333,stroke-width:2px;
    classDef backend fill:#9f9,stroke:#333,stroke-width:2px;
    classDef bookie fill:#f99,stroke:#333,stroke-width:2px;
    classDef techlead fill:#6cf,stroke:#333,stroke-width:2px;

    class A reskov
    class B anvar
    class H,K,L,M frontend
    class C,D,E,F,G backend
    class I,J bookie
    class C techlead

    subgraph O
        direction TB
        B
        subgraph B
            direction TB
            C
            D
            E
            F
            G
        end
        subgraph D
            direction TB
            H
            K
            L
            M
        end
        subgraph S
            direction TB
            I
            J
        end
    end

It renders an image on the left side with colours, but in the excalidraw there aren't any. Screenshot is below

Screenshot 2024-07-18 at 10 50 16
ad1992 commented 3 months ago

Hi @axilis-marko, thanks for creating the report. We don't support colors yet but definately an enhancement to add.

EDIT: we do support via the styles attribute but not via classes