colour = colour.trim();
Color col = null;
- if (colour.length() == 6 && StringUtils.isHexString(colour))
+ if (StringUtils.isHexString(colour))
{
try
{
return col;
}
-
- public static boolean couldBeHexColor(String n) {
- return (n.length() > 0 && "abcdefABCDEF".indexOf(n.charAt(0)) >= 0);
- }
/**
* Constructs a colour from a text string. The hashcode of the whole string is