iurysza / module-graph

A Gradle Plugin for visualizing your project's structure, powered by mermaidjs
https://plugins.gradle.org/plugin/dev.iurysouza.modulegraph
MIT License
346 stars 13 forks source link

Implement a way to customize mermaid's themeVariables. #17

Closed iurysza closed 1 year ago

iurysza commented 1 year ago

💡 Describe the solution you'd like

Implement a way to customize mermaid's theme. According to the mermaid's docs:

Customizing Themes with themeVariables

To make a custom theme, modify themeVariables via init. You will need to use the base theme as it is the only modifiable theme.

So we can solve this exposing an API that looks like this:

moduleGraphConfig {
    theme.set(
        Base(themeVariables =  // Optional
            mapOf(
                "primaryColor" to "#BB2528",
                "primaryTextColor" to "#fff",
                "primaryBorderColor" to "#7C0000",
                "lineColor" to "#F8B229",
                "secondaryColor" to "#006100",
                "tertiaryColor" to "#fff"
            )
        )
    )
}

🤚 Do you want to develop this feature yourself?