Granular HyperLinkColor

0 votes
asked Nov 10 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 by plantuml (262,900 points)

We've fixed some issues in last beta http://beta.plantuml.net/plantuml.jar

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:

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

<style>
  root {
    BackgroundColor $BGCOLOR
    FontColor #?black:white
    HyperLinkColor #?blue:cyan
    LineColor black
  }
  note {
    BackgroundColor $DARK_BG
    LineColor red
  }
</style>


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

Does it help ?

commented Nov 10 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 by plantuml (262,900 points)

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

In the meantime, you can compile source from github.

...