Granular HyperLinkColor

0 votes
asked Nov 10, 2021 in Wanted features by coxley (220 points)

In a lot of our diagrams, we'll set some objects darker colors. This works well for the most part but it messes with hyperlinks. See the diagram linked here.

This was asked in 2018, bumped in 2019, and so I thought I'd create a new one with use-case. Especially since <style> is here now -- you may have a way to support it in the new solution in mind already.

Let me know what you think. Thanks a lot!

1 Answer

0 votes
answered Nov 10, 2021 by plantuml (292,180 points)

We've fixed some issues in last beta

There is a not-very-documented syntax for FontColor that allow to automatically switch between two colors depending on the backgroud. We've just extended this for HyperLinkColor so you can now have:

!$FGCOLOR = "black"
!$BGCOLOR = "white"
!$DARK_BG = "#565656"

  root {
    BackgroundColor $BGCOLOR
    FontColor #?black:white
    HyperLinkColor #?blue:cyan
    LineColor black
  note {
    BackgroundColor $DARK_BG
    LineColor red

rectangle "Link to [[ Google]]"
note bottom
And here's a long description about something
that may or may not include a [[ cool link somewhere]]

Does it help ?

commented Nov 10, 2021 by coxley (220 points)
Yes -- this will be awesome! Thank you. Out of curiosity, when/what release will this be in? I have to build from source.
commented Nov 10, 2021 by plantuml (292,180 points)

This will be released in the incoming weeks, before the end of the month.

In the meantime, you can compile source from github.