[Style][State] Allow FontColor style on State

+1 vote
asked Sep 15, 2021 in Wanted features by The-Lu (37,800 points)

Hello PlantUML team,

  • Could you allow [style] FontColor on State diagram?

Especially to correct some theme (e.g. see 'State with amiga theme'), without adding skinparam in them.

Here are some example:

Code Output
@startuml
skinparam StateFontColor red
skinparam FontColor red

title How to change fontcolor by style?
state A {
  state B {
  }
  state C {
    state c : state c
  }
}
 
state S1 : state S1
state S2
@enduml

state header: OK
state label: KO
@startuml
skinparam StateFontColor red
skinparam StateAttributeFontColor red

title How to change fontcolor by style?
state A {
  state B {
  }
  state C {
    state c : state c
  }
}
 
state S1 : state S1
state S2
@enduml

state header: OK
state label: OK
@startuml
<style>
root {
  FontColor Red
}
</style>
title How to change fontcolor by style?
state A {
  state B {
  }
  state C {
    state c : state c
  }
}
 
state S1 : state S1
state S2
@enduml

state header: KO
state label: KO
@startuml
<style>
stateDiagram {
  FontColor Red
}
</style>

title How to change fontcolor by style?
state A {
  state B {
  }
  state C {
    state c : state c
  }
}
 
state S1 : state S1
state S2
@enduml

state header: KO
state label: KO
......

And same question about all the other styles element... wink
 

[ How to translate those skinparam on style:

skinparam State {
  AttributeFontColor blue
  AttributeFontName serif
  AttributeFontSize  9
  AttributeFontStyle italic
  BackgroundColor palegreen
  BorderColor violet
  EndColor gold
  FontColor red
  FontName Sanserif
  FontSize 15
  FontStyle bold
  StartColor silver
}

blush

Thanks for your works,
Regards,
Th.

1 Answer

0 votes
answered Oct 8, 2021 by The-Lu (37,800 points)
selected Oct 8, 2021 by The-Lu
 
Best answer

This is now corrected on V1.2021.11 (2 Oct, 2021).

[ How to translate those skinparam on style:

skinparam State {
  AttributeFontColor blue
  AttributeFontName serif
  AttributeFontSize  9
  AttributeFontStyle italic
  BackgroundColor palegreen
  BorderColor violet
  EndColor gold
  FontColor red
  FontName Sanserif
  FontSize 15
  FontStyle bold
  StartColor silver
}

blush

Thank to PlantUML team,
Regards,
Th.

...