* @param isRgb true to output an RGB color, or false for Hex
* @return the attribute as a string
*/
protected String getColorStyleAttribute( String args, int attrib, boolean isRgb, boolean isHSB )
{
XStyleManager sm = currentProject.getStyleManager();
int rScale = 100;
int gScale = 100;
int bScale = 100;
int pos;
if ( ( pos = args.indexOf( ',' ) ) > 0 ) {
int pos2 = args.indexOf( ',', pos + 1 );
int pos3 = args.indexOf( ',', pos2 + 1 );
rScale = Integer.parseInt( args.substring( pos + 1, pos2 ) );
gScale = Integer.parseInt( args.substring( pos2 + 1, pos3 ) );
bScale = Integer.parseInt( args.substring( pos3 + 1 ) );
args = args.substring( 0, pos );
}
Color attribValue = sm.getStyle( args.trim() ).getStyleAsColor( attrib );
int r = attribValue.getRed();
int g = attribValue.getGreen();
int b = attribValue.getBlue();
if ( !isHSB ) {
if ( rScale < 100 )