List of utility methods to do Color Darker
Color | getDarker(Color color) get Darker float hsbVals[] = Color.RGBtoHSB(color.getRed(), color.getGreen(), color.getBlue(), null); return Color.getHSBColor(hsbVals[0], hsbVals[1], 0.8f * hsbVals[2]); |
Color | getDarker(Color color, double factor) get Darker return new Color(Math.max((int) (color.getRed() * factor), 0), Math.max((int) (color.getGreen() * factor), 0), Math.max((int) (color.getBlue() * factor), 0)); |
Color | getDarkerColor(Color color) get Darker Color return getScaledColor(color, DARKER_SCALE);
|
Color | getDarkerColor(Color color, double diff) Returns darker version of the specified color. int r = (int) ((1.0 - diff) * color.getRed()); int g = (int) ((1.0 - diff) * color.getGreen()); int b = (int) ((1.0 - diff) * color.getBlue()); return new Color(r, g, b); |
Color | getDarkerLine(Color c, float alternateRowDarkerFactor) get Darker Line return getSafeColor((int) (c.getRed() * alternateRowDarkerFactor), (int) (c.getGreen() * alternateRowDarkerFactor), (int) (c.getBlue() * alternateRowDarkerFactor)); |
Color | getLineDarkColor() get Line Dark Color return lineDarkColor;
|
void | initializePattern(Color light, Color dark) Initializes the pattern image. pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_ARGB);
lightColor = light;
darkColor = dark;
Graphics g = pattern2D.getGraphics();
g.setColor(light);
g.fillRect(0, 0, 1, 1);
g.fillRect(2, 2, 1, 1);
g.setColor(dark);
...
|
Color | makeDarker(final Color color, final double percentage) make Darker int r = Math.max(color.getRed() - (int) (color.getRed() * percentage), 0); int g = Math.max(color.getGreen() - (int) (color.getGreen() * percentage), 0); int b = Math.max(color.getBlue() - (int) (color.getBlue() * percentage), 0); return new Color(r, g, b); |
boolean | reallyDark(Color c) Return true if the color is really dark. synchronized (hue_sat_bri) { Color.RGBtoHSB(c.getRed(), c.getGreen(), c.getBlue(), hue_sat_bri); return (hue_sat_bri[2] < 0.10f); |
void | setColorsDarkTheme() set Colors Dark Theme wireColor = Color.WHITE; controlPathColor = new Color(0, 170, 230); criticalPathColor = Color.RED; irrelevantColor = Color.GRAY; readColor = new Color(0, 128, 0); writeColor = new Color(128, 0, 0); rwColor = new Color(128, 128, 0); instColor = new Color(110, 110, 110); ... |