Java Color Invert invertColor(Color c)

Here you can find the source of invertColor(Color c)

Description

invert Color

License

LGPL

Declaration

public static Color invertColor(Color c) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.awt.*;

public class Main {
    public static Color invertColor(Color c) {
        return new Color(255 - c.getRed(), 255 - c.getGreen(), 255 - c.getBlue());
    }//from www .ja v  a  2 s.c  om
}

Related

  1. invert(Color c)
  2. invert(Color color)
  3. invert(Color color)
  4. invert(Color color)
  5. invert(Color colour)
  6. invertColor(Color cColor)
  7. invertColor(int color)
  8. invertColor(int color)
  9. invertColor(int color)