skanaar / nomnoml

The sassy UML diagram renderer
https://www.nomnoml.com
MIT License
2.66k stars 208 forks source link

text color or font color #79

Closed ManzDev closed 5 years ago

ManzDev commented 5 years ago

Hi,

Is possible change text color in a custom classifier styles?

I tried this (and similar) and don't works: #.class: fill=#A8A textcolor=#FFF stroke=#FFF

skanaar commented 5 years ago

It is not supported, right now. Perhaps something for the todo list.

But I feel that layout-related tasks are of higher priority.

skanaar commented 5 years ago

stroke=#FFF is now supported and will set both text and border color, which is nice for darker backgrounds. We could, of course, allow even more customization but I'll try this and see how it is received.

sbrl commented 4 years ago

@skanaar: How do you use stroke? If I do this:

#stroke: red
#fill: green

....before a diagram then it changes the outline colours, but it doesn't change the text colour.

skanaar commented 4 years ago

Please describe your environment and diagram input. I cannot reproduce your issue when I try it in the webapp.

sbrl commented 4 years ago

Sure, @skanaar. I'm using the nomnoml cli that's provided with the nomnoml package, that I've globally installed.

The following diagram code causes the issue to appear:

#stroke: green
#fill: red
[Pirate|eyeCount: Int|raid();pillage()|
  [beard]--[parrot]
  [beard]-:>[foul mouth]
]

[<abstract>Marauder]<:--[Pirate]
[Pirate]- 0..7[mischief]
[jollyness]->[Pirate]
[jollyness]->[rum]
[jollyness]->[singing]
[Pirate]-> *[rum|tastiness: Int|swig()]
[Pirate]->[singing]
[singing]<->[rum]

[<start>st]->[<state>plunder]
[plunder]->[<choice>more loot]
[more loot]->[st]
[more loot] no ->[<end>e]

[<actor>Sailor] - [<usecase>shiver me;timbers]

Example rendering:

example

(Converted from svg to png by inkscape, since GH doesn't allow uploads of SVG directly)

skanaar commented 4 years ago

Thank you for reporting 👍 It is a bug in the SVG renderer. It should be taken care of now with the release of 0.6.2.

Thanks!

sbrl commented 4 years ago

Thanks so much @skanaar :heart: :rocket: