Examples of RGBtoHSB()


Examples of java.awt.Color.RGBtoHSB()

        g2d.setColor( Color.white );
        Area borderArea = new Area( new RoundRectangle2D.Double( 0.0, 0.0, BUTTON_SIZE, BUTTON_SIZE, 4.0, 4.0 ));
        g2d.fill( borderArea );
        // Rotate the color by 180 degrees
        Color frgdColor = SystemColor.activeCaption;
        float f[] = frgdColor.RGBtoHSB( frgdColor.getRed(), frgdColor.getGreen(), frgdColor.getBlue(), null );
        frgdColor = Color.RED;//Color.getHSBColor(( f[ 0 ] + 0.5F ) % 1.0F, 1.0F, 1.0F );
        frgdColor = ( state == 0 ? frgdColor.darker() : state == 1 ? frgdColor.darker().darker() : frgdColor );
        GradientPaint gradient = new GradientPaint( 0.0F, 0.0F, frgdColor,
                                                    (float)BUTTON_SIZE/2.0F, (float)BUTTON_SIZE/2.0F,
                                                    frgdColor.darker(), true );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.