Customize colors
raphael-leger opened this issue · 3 comments
Hi,
Currently the colors of the diagram are hardcoded, for instance:
typeorm-uml/src/builder/uml-builder.class.ts
Lines 43 to 45 in 6bab2db
It would be nice to have a set of flags enabling their customization such as:
--primary-key-color #aaaaaa
--foreign-key-color #aaaaaa
--column-color #aaaaaa
--entity-background-color #aaaaaa
--entity-border-color #aaaaaa
--arrow-color #aaaaaa
Hi @raphael-leger!
Thanks, for the suggestion. I have implemented it and published as the @next
version for now (use npm i -D typeorm-uml@next
to install it). Could you please check it on your end and let me know if it is what you need?
You should be able to define colors using --color <key>=<value>
flags where <key>
can be pkey
, fkey
, column
, class.BackgroundColor
, class.BorderColor
and class.ArrowColor
. For example:
typeorm-uml path/to/ormconfig.json --color pkey=#00ff00 --color fkey=#00aa00 --color column=#007700
Thanks for the quick implementation, it appears to be working well 👍
Awesome! Closing this ticket then. This will be shipped with the next release. For now, it can be installed using @next
tag.