Results 1 to 3 of 3
  1. #1
    Daniel is offline Member
    Join Date
    Jun 2007
    Posts
    91
    Rep Power
    0

    Default Help with switch color

    I don't know the real name for this, but I would like to change the color to it's opposer

    for example, if the color is white, I wan't to make it black

    I don't think there's an existing method for it, but if you could give me some guidelines on how to make one, I will be happy

    Thanks
    Daniel:o

  2. #2
    Albert is offline Senior Member
    Join Date
    Jun 2007
    Posts
    114
    Rep Power
    0

    Default

    Founded the solution over here

    The code I have at the moment, to achieve that in Java:
    Java Code:
    float[] colorHSB = color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null);
    colorHSB[1] += 0,5;
    if(colorHSB[1] > 1) { 
            colorHSB[1] -= 1; 
            }
    at the moment this gives an error at:
    colorHSB[1] += 0,5;

    Greetings
    Albert:rolleyes:

  3. #3
    dhnsekaran is offline Member
    Join Date
    Sep 2008
    Posts
    9
    Rep Power
    0

Similar Threads

  1. Method in a Switch Statement
    By cart1443 in forum New To Java
    Replies: 6
    Last Post: 03-14-2008, 04:48 AM
  2. Switch Statement Help
    By bluegreen7hi in forum New To Java
    Replies: 6
    Last Post: 02-06-2008, 06:16 AM
  3. Switch Statemet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-30-2007, 10:16 AM
  4. Adding Variables and using Switch
    By notnumber6 in forum New To Java
    Replies: 4
    Last Post: 11-03-2007, 06:45 PM
  5. Help with Switch string code
    By toby in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 07:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •