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
-
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelColor
fromPackedARGB
(int argb) Create a channel color from a packed ARGB value.static ChannelColor
fromRGB
(int red, int green, int blue) Create a channel color from 8-bit RGB values.int
getBlue()
Get the blue value.int
getGreen()
Get the green value.int
getRed()
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:
-