Skip to content
This repository was archived by the owner on May 30, 2019. It is now read-only.

Commit 0263ad5

Browse files
committed
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.
1 parent e5e748b commit 0263ad5

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

application/src/indrora/atomic/model/Message.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,14 @@ private int getSenderColor()
259259
color += sender.charAt(i);
260260
}
261261

262-
/* we dont want color[colors.length-1] which is black */
263-
//color = color % (colors.length - 1);
264-
262+
// We don't want the color to be the background color.
263+
int tmpColor = _scheme.getColor(color % 16);
264+
while(tmpColor == _scheme.getBackground())
265+
{
266+
tmpColor = _scheme.getColor(color*color % 16);
267+
}
265268

266-
return _scheme.getColor(color % 16); //colors[color];
269+
return tmpColor; //colors[color];
267270
}
268271

269272
/**

0 commit comments

Comments
 (0)