public final class ColourUtils extends Object
int 0xrrggbb encoded colour values.| Modifier and Type | Method and Description |
|---|---|
static boolean |
isGreyScale(int colour) |
static int |
mix(int colour1,
int colour2)
Mix two colours by mixing their red, green and blue components exactly equally.
|
static int |
mix(int colour1,
int colour2,
int alpha)
Mix two colours by mixing their red, green and blue components according to an alpha value between 0 and 256
(inclusive), where an alpha of 0 results in just
colour1 and 256 in just colour2. |
static int |
multiply(int colour,
int amount)
Multiplies each of component of
colour with
amount and divides the result by 256. |
public static int mix(int colour1,
int colour2)
mix(colour1, colour2, 128).public static int mix(int colour1,
int colour2,
int alpha)
colour1 and 256 in just colour2.public static int multiply(int colour,
int amount)
colour with
amount and divides the result by 256.colour - The RGB colour to multiply.amount - The amount to multiply each colour band with, where 256
leaves the colour unchanged.public static boolean isGreyScale(int colour)
Copyright © 2011–2025 pepsoft.org. All rights reserved.