Can we have 2 or more colors for clocks in timing diagrams ?

0 votes
asked Apr 22 in Question / help by anonymous

Hello,

I’d like to have 2 different colors to use for clock signals in the timing diagram.

Doing something like that gives a syntax error:

@startuml example

<style>

timingDiagram {

  .red {

    LineColor red

  }

  .yellow {

    LineColor yellow

  }

}

</style>

clock "Clock1" as clock1 <<red>> with period 5000 pulse 1

clock "Clock2" as clock2 <<yellow>> with period 20000 pulse 1

@enduml

This would be nice to have for example one color per clock domain.

Thanks.

commented Apr 22 by The-Lu (74,900 points)

1 Answer

0 votes
answered Nov 16 by The-Lu (74,900 points)

Hello A.,

FYI that is now implemented for Clock on v1.2024.8:

- Thanks PlantUML team for your work.

Here is the correct syntax (put stereo at the end):

@startuml example
<style>
timingDiagram {
  .red {
    LineColor red
  }
  .yellow {
    LineColor yellow
  }
}
</style>

clock "Clock1" as clock1 with period 5000 pulse 1 <<red>>
clock "Clock2" as clock2 with period 20000 pulse 1 <<yellow>>

@enduml

Ref.:

Enjoy,

Regards,
Th.

...