Please provide a way to inline set the background color of notes

+1 vote
asked Jun 30, 2016 in Closed feature request by legz (300 points)
edited Jun 30, 2016 by legz

It's possible to change activities and conditionnal items color with :

- a "#ColorCode" before the activity.

- a "#ColorCode:" before the "if".

But there is no way to set a note color:

@startuml
start
#green:if (Turn On The Game?) then (yes)
  :Having Fun;
else (no)
  #red:Not Having Fun;
  note right:sad note is sad
endif
stop
@enduml

Please provide a way to inline set the background color of notes.

Example syntax: note right #blue :sad note is sad

1 Answer

+2 votes
answered Jul 1, 2016 by plantuml (295,000 points)
selected Jul 1, 2016 by legz
 
Best answer

With last beta: https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can have:

@startuml
start
if (Turn On The Game?) then (yes)
  :Having Fun;
  note left #red
    this
    is
    note
  end note
else (no)
  :Not Having Fun;
  note right #blue :sad note is sad
endif
stop
@enduml

Is this what you are expecting?

commented Jul 1, 2016 by legz (300 points)
Thanks, that's perfect:)
commented Nov 9, 2022 by someguy
Is there a way to do this for notes on methods?
 

note left of testClass::"boolean thisTing" #red

    Depricated, use otherThing()

end note
...