it:ad:plantuml:howto:force_black_and_white_diagrams

IT:AD:PlantUML:HowTo:Force Black And White Diagrams

Summary

Can't say I'm a big fan of IT:AD:PlantUML's default brown-ish colours.

And defining a Skin in each diagram is too difficult and error-prone.

But I can live with restrained black and white diagrams.

Add the following:

skinparam monochrome true

Example:

FooBar

If for any reason (eg: you've imported an external style sheet that turned off color) you want to turn it back on, add the following after the !importurl statement:

skinparam monochrome false

Of course, sometimes you want black white for most things, and be able to color a bit as needed. In which case you need something more like:

skinparam {
	state {
	  ArrowColor grey
	  BackgroundColor white
	  BorderColor black
	}

	note {
	  ArrowColor grey
	  BackgroundColor white
	  BorderColor black
	}

	package {
	  ArrowColor grey
	  BackgroundColor white
	  BorderColor black
	}

	component {
	  ArrowColor grey
	  BackgroundColor white
	  BorderColor black
	  
	  InterfaceBackgroundColor white
	  InterfaceBorderColor Black
	}

	class {
	  ArrowColor grey
	  BackgroundColor white
	  BorderColor black
	}

	object {
	  ArrowColor grey
	  BackgroundColor white
	  BorderColor black
	}

	actor {
	  ArrowColor grey
	  BackgroundColor white
	  BorderColor black
	}

	usecase {
	  ArrowColor grey
	  BackgroundColor white
	  BorderColor black
	}

	activity {
	  ArrowColor grey
	  BackgroundColor white
	  BorderColor black
	}

	sequence {
	  ArrowColor	grey
	  DividerBackgroundColor	    white
	  GroupBackgroundColor	        white
	  LifeLineBackgroundColor	    white
	  LifeLineBorderColor	        black
	  ParticipantBackgroundColor    white
	  ParticipantBorderColor        black
	  BoxLineColor                  black
	  BoxBackgroundColor            white
	}

	stereotype {
	  CBackgroundColor lightgrey
	  ABackgroundColor lightgrey
	  IBackgroundColor lightgrey
	  EBackgroundColor lightgrey
	}
}

The above allows you to do something like:

!includeurl http://skysigal.com/_media/resources/configuration/plantuml/minimalist.txt

class A 
class B
class C #pink

A -- B
B -- C

ABC

  • /home/skysigal/public_html/data/pages/it/ad/plantuml/howto/force_black_and_white_diagrams.txt
  • Last modified: 2023/11/04 23:01
  • by 127.0.0.1