• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Colors for Relationships

 
Vignesh Murali Natarajan
Ranch Hand
Posts: 65
Firefox Browser Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my class diagram, I have a lot of relationships running in every which direction. I am using random colors to distinguish one relationship(and its stereotypes) from another? I know UML has standard colors set aside for stereotypes. Is this wrong? Should I resort to just using black? (If I should not be using other colors why on earth do most UML tools provide the ability to change colors )
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your question is not clear to me...why do you want to distinguigsh relationships with colors?
I mean, generalization/realization/association(composition/aggregation)/usage dependancy all have different arrowheads and line styles. That itself is sufficient, right?
 
Vignesh Murali Natarajan
Ranch Hand
Posts: 65
Firefox Browser Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranganathan Kaliyur Mannar wrote:your question is not clear to me...why do you want to distinguigsh relationships with colors?
I mean, generalization/realization/association(composition/aggregation)/usage dependancy all have different arrowheads and line styles. That itself is sufficient, right?


Ranganathan,
I did not mean distinguishing between different relationships like dependency, realization association etc. What I meant was that I was using random colors to distinguish relationships of one class from another. For Instance, all relationships(and their corresponding stereotypes) arising from a single class will have the same color. This was done because there were many class linked together and hence to improve readability. Hope I am making my point clear
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
still not clear...I understand that you obviously cannot paste the diagram. suppose class A has (composition) class B, class C, then you how the relationship with say green color. Another unrelated class D has class E (composition). Are you showing this in different color? I don't think its a good idea. btw, how many classes do you have?
 
Vignesh Murali Natarajan
Ranch Hand
Posts: 65
Firefox Browser Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranganathan Kaliyur Mannar wrote:still not clear...I understand that you obviously cannot paste the diagram. suppose class A has (composition) class B, class C, then you how the relationship with say green color. Another unrelated class D has class E (composition). Are you showing this in different color? I don't think its a good idea. btw, how many classes do you have?


I had close to 60 classes. Lets say Class A has relationships with Class B & C(association and dependency). Both are shown in green color. Similarly lets say Class B has relationship with Class D & E (be it any relationship), these both are shown in orange color. The colors are not picked based on the type of relationships, but just random colors have been used.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm...I don't think its a good idea to use different colors for relationship 'lines' of different classes...maybe you can use the same color for the same 'type' of relationship. Also, when we use color for a class or note its huge and visible. When you use color for a line it may not be clearly visible. That is again a negative point for us. In Sheil's chapter 9, he says that we have to provide 'legend' if we are using colors. If you are using random colors, again you have a problem.

As for UML tools providing options for colors:
I have myself used colors in my designs where I show classes in 'yellow' and notes in 'pink' - but not for the relationship lines - and I am not using any colors for the exam...
 
Vignesh Murali Natarajan
Ranch Hand
Posts: 65
Firefox Browser Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ranganathan Kaliyur Mannar wrote:hmm...I don't think its a good idea to use different colors for relationship 'lines' of different classes...maybe you can use the same color for the same 'type' of relationship. Also, when we use color for a class or note its huge and visible. When you use color for a line it may not be clearly visible. That is again a negative point for us. In Sheil's chapter 9, he says that we have to provide 'legend' if we are using colors. If you are using random colors, again you have a problem.

As for UML tools providing options for colors:
I have myself used colors in my designs where I show classes in 'yellow' and notes in 'pink' - but not for the relationship lines - and I am not using any colors for the exam...



OK. Thanks for sharing your thoughts
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic