[Jalview-discuss] proper way to add a new color scheme
hkaya at iontek.com.tr
Wed Dec 9 08:04:17 GMT 2009
I was in need for a color scheme that is very similar to "Percentage
But it should only paint the backgrounds of bases different than
consensus with the color pink.
It is very simple in the sense that it doesn't require threshold values.
I couldn't find a way to do this from menus including "User defined"
color scheme menu.
So i simply had to change PIDColorScheme.findColor method like this:
public Color findColour(char c, int j)
if ('a' <= c && c <= 'z')
c -= ('a' - 'A');
if (consensus == null || j >= consensus.length || consensus[j] == null)
Color currentColour = Color.white;
if (consensus.length <= j)
currentColour = Color.WHITE;
currentColour = Color.PINK;
I will be glad if you point a better way to do this. How can i create
this color scheme just by using the menus
not by ruining the source code.
More information about the Jalview-discuss