From 0263ad5c41ed26fde8e9e96a3050bd488a1868d2 Mon Sep 17 00:00:00 2001 From: Morgan Gangwere Date: Tue, 11 Feb 2014 15:20:41 -0700 Subject: [PATCH] Fixed nick colors possibly being the background color. It is still possible for mIRC colors to change the color to black on black, but that is a specific part of the mIRC color spectrum. --- application/src/indrora/atomic/model/Message.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/application/src/indrora/atomic/model/Message.java b/application/src/indrora/atomic/model/Message.java index f439c75..11000c3 100644 --- a/application/src/indrora/atomic/model/Message.java +++ b/application/src/indrora/atomic/model/Message.java @@ -259,11 +259,14 @@ private int getSenderColor() color += sender.charAt(i); } - /* we dont want color[colors.length-1] which is black */ - //color = color % (colors.length - 1); - + // We don't want the color to be the background color. + int tmpColor = _scheme.getColor(color % 16); + while(tmpColor == _scheme.getBackground()) + { + tmpColor = _scheme.getColor(color*color % 16); + } - return _scheme.getColor(color % 16); //colors[color]; + return tmpColor; //colors[color]; } /**