Package qupath.lib.display.settings
Class ChannelColor
java.lang.Object
qupath.lib.display.settings.ChannelColor
A simple class to store the color of an image channel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelColorfromPackedARGB(int argb) Create a channel color from a packed ARGB value.static ChannelColorfromRGB(int red, int green, int blue) Create a channel color from 8-bit RGB values.intgetBlue()Get the blue value.intgetGreen()Get the green value.intgetRed()Get the red value.
-
Constructor Details
-
ChannelColor
public ChannelColor()
-
-
Method Details
-
fromRGB
Create a channel color from 8-bit RGB values.- Parameters:
red-green-blue-- Returns:
- Throws:
IllegalArgumentException- if any of the values are outside the range 0 to 255.
-
fromPackedARGB
Create a channel color from a packed ARGB value. The alpha will be ignored.- Parameters:
argb-- Returns:
-
getRed
public int getRed()Get the red value.- Returns:
-
getGreen
public int getGreen()Get the green value.- Returns:
-
getBlue
public int getBlue()Get the blue value.- Returns:
-