public static RGB makeColor ( final String color )
{
if ( color == null )
{
return null;
}
if ( color.startsWith ( "#" ) )
{
if ( color.length () == 1 + 3 )
{
return makeRGB ( color.substring ( 1, 2 ) + "0", color.substring ( 2, 3 ) + "0", color.substring ( 3, 4 ) + "0" );
}
else if ( color.length () >= 1 + 6 )
{
return makeRGB ( color.substring ( 1, 3 ), color.substring ( 3, 5 ), color.substring ( 5, 7 ) );
}
}
return null;
}
Helper.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:neoscada
作者:
评论列表
文章目录