Automatic fill colour but opposite to theme

41 views
Skip to first unread message

Jim Hawkins

unread,
Apr 6, 2023, 10:20:02 AM4/6/23
to diagrams.net Q&A
Hi, How can a shape have a fill colour that is
- black if the diagram is viewed with light appearance.
- white if the diagram is viewed with dark appearance.

A shape can be given a line colour like that, by opening the Edit Style dialog and setting strokeColor=default in the key-value pairs.

If fillColor=default is set then the fill colour will be
- white if the diagram is viewed with light appearance.
- black if the diagram is viewed with dark appearance.

That's the opposite to what I want for some shapes.

Context is that I'm drawing UML activity diagrams. The start node should be a black circle, in light appearance, or a white circle, in dark appearance. Maybe there's another special value to which fillColor can be set? I couldn't find documentation of the possible values.

Cheers, Jim

diagrams.net Q&A

unread,
Apr 10, 2023, 12:43:45 AM4/10/23
to diagrams.net Q&A
Try fillColor=strokeColor or fillColor=default;defaultFillColor=invert

Jim Hawkins

unread,
Apr 11, 2023, 5:53:08 AM4/11/23
to diagrams.net Q&A
That works! Thank you.
Reply all
Reply to author
Forward
0 new messages