2012年10月29日月曜日

java 16進数から色へ変換 関数

// Hex to color 16進数から色へ変換 
int intValue = Integer.parseInt( "ff0000",16);
Color aColor = new Color( intValue );

// Color to hex 色は16進数へ変換
String hexStr = Integer.toHexString( aColor.getRGB() );

0 件のコメント:

コメントを投稿