Java Color Multiply multiplyColor(int p_180188_0_, int p_180188_1_)

Here you can find the source of multiplyColor(int p_180188_0_, int p_180188_1_)

Description

multiply Color

License

LGPL

Declaration

public static int multiplyColor(int p_180188_0_, int p_180188_1_) 

Method Source Code

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

public class Main {
    public static int multiplyColor(int p_180188_0_, int p_180188_1_) {
        int i = (p_180188_0_ & 16711680) >> 16;
        int j = (p_180188_1_ & 16711680) >> 16;
        int k = (p_180188_0_ & 65280) >> 8;
        int l = (p_180188_1_ & 65280) >> 8;
        int i1 = (p_180188_0_ & 255) >> 0;
        int j1 = (p_180188_1_ & 255) >> 0;
        int k1 = (int) ((float) i * (float) j / 255.0F);
        int l1 = (int) ((float) k * (float) l / 255.0F);
        int i2 = (int) ((float) i1 * (float) j1 / 255.0F);
        return p_180188_0_ & -16777216 | k1 << 16 | l1 << 8 | i2;
    }//from w  ww  . j a v  a  2  s. c o  m
}

Related

  1. multiply(double color1, double color2)
  2. multiply(int colorA, int colorB)
  3. multiplyColor(int src, int dst)
  4. multiplyColorComponents(int color, float brightnessFactor)