---
Product: Aspose.Slides
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/slides/java/Color
---

# Color

## Overview

`Color` is a class in Aspose.Slides FOSS for Java.

Immutable value type representing an ARGB color.

This class provides 19 methods for working with Color objects in Java programs.
Available methods include: `Color`, `a`, `b`, `equals`, `fromArgb`, `g`, `getA`, `getB`, `getG`, `getR`, `hashCode`, `isEmpty`, and 3 additional methods.
All public members are accessible to any Java application after installing the Aspose.Slides FOSS for Java package.
Properties: `ALICE_BLUE`, `ANTIQUE_WHITE`, `AQUA`, `AQUAMARINE`, `AZURE`, `BEIGE`, and 141 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `a` | `int` | Read | Gets the alpha component. |
| `r` | `int` | Read | Gets the red component. |
| `g` | `int` | Read | Gets the green component. |
| `b` | `int` | Read | Gets the blue component. |
| `empty` | `boolean` | Read | Returns {@code true} if this color is empty (all components are zero). |
| `TRANSPARENT` | `Color` | Read | Transparent (alpha=0, white). |
| `ALICE_BLUE` | `Color` | Read | AliceBlue. |
| `ANTIQUE_WHITE` | `Color` | Read | AntiqueWhite. |
| `AQUA` | `Color` | Read | Aqua. |
| `AQUAMARINE` | `Color` | Read | Aquamarine. |
| `AZURE` | `Color` | Read | Azure. |
| `BEIGE` | `Color` | Read | Beige. |
| `BISQUE` | `Color` | Read | Bisque. |
| `BLACK` | `Color` | Read | Black. |
| `BLANCHED_ALMOND` | `Color` | Read | BlanchedAlmond. |
| `BLUE` | `Color` | Read | Blue. |
| `BLUE_VIOLET` | `Color` | Read | BlueViolet. |
| `BROWN` | `Color` | Read | Brown. |
| `BURLY_WOOD` | `Color` | Read | BurlyWood. |
| `CADET_BLUE` | `Color` | Read | CadetBlue. |
| `CHARTREUSE` | `Color` | Read | Chartreuse. |
| `CHOCOLATE` | `Color` | Read | Chocolate. |
| `CORAL` | `Color` | Read | Coral. |
| `CORNFLOWER_BLUE` | `Color` | Read | CornflowerBlue. |
| `CORNSILK` | `Color` | Read | Cornsilk. |
| `CRIMSON` | `Color` | Read | Crimson. |
| `CYAN` | `Color` | Read | Cyan. |
| `DARK_BLUE` | `Color` | Read | DarkBlue. |
| `DARK_CYAN` | `Color` | Read | DarkCyan. |
| `DARK_GOLDENROD` | `Color` | Read | DarkGoldenrod. |
| `DARK_GRAY` | `Color` | Read | DarkGray. |
| `DARK_GREEN` | `Color` | Read | DarkGreen. |
| `DARK_KHAKI` | `Color` | Read | DarkKhaki. |
| `DARK_MAGENTA` | `Color` | Read | DarkMagenta. |
| `DARK_OLIVE_GREEN` | `Color` | Read | DarkOliveGreen. |
| `DARK_ORANGE` | `Color` | Read | DarkOrange. |
| `DARK_ORCHID` | `Color` | Read | DarkOrchid. |
| `DARK_RED` | `Color` | Read | DarkRed. |
| `DARK_SALMON` | `Color` | Read | DarkSalmon. |
| `DARK_SEA_GREEN` | `Color` | Read | DarkSeaGreen. |
| `DARK_SLATE_BLUE` | `Color` | Read | DarkSlateBlue. |
| `DARK_SLATE_GRAY` | `Color` | Read | DarkSlateGray. |
| `DARK_TURQUOISE` | `Color` | Read | DarkTurquoise. |
| `DARK_VIOLET` | `Color` | Read | DarkViolet. |
| `DEEP_PINK` | `Color` | Read | DeepPink. |
| `DEEP_SKY_BLUE` | `Color` | Read | DeepSkyBlue. |
| `DIM_GRAY` | `Color` | Read | DimGray. |
| `DODGER_BLUE` | `Color` | Read | DodgerBlue. |
| `FIREBRICK` | `Color` | Read | Firebrick. |
| `FLORAL_WHITE` | `Color` | Read | FloralWhite. |
| `FOREST_GREEN` | `Color` | Read | ForestGreen. |
| `FUCHSIA` | `Color` | Read | Fuchsia. |
| `GAINSBORO` | `Color` | Read | Gainsboro. |
| `GHOST_WHITE` | `Color` | Read | GhostWhite. |
| `GOLD` | `Color` | Read | Gold. |
| `GOLDENROD` | `Color` | Read | Goldenrod. |
| `GRAY` | `Color` | Read | Gray. |
| `GREEN` | `Color` | Read | Green. |
| `GREEN_YELLOW` | `Color` | Read | GreenYellow. |
| `HONEYDEW` | `Color` | Read | Honeydew. |
| `HOT_PINK` | `Color` | Read | HotPink. |
| `INDIAN_RED` | `Color` | Read | IndianRed. |
| `INDIGO` | `Color` | Read | Indigo. |
| `IVORY` | `Color` | Read | Ivory. |
| `KHAKI` | `Color` | Read | Khaki. |
| `LAVENDER` | `Color` | Read | Lavender. |
| `LAVENDER_BLUSH` | `Color` | Read | LavenderBlush. |
| `LAWN_GREEN` | `Color` | Read | LawnGreen. |
| `LEMON_CHIFFON` | `Color` | Read | LemonChiffon. |
| `LIGHT_BLUE` | `Color` | Read | LightBlue. |
| `LIGHT_CORAL` | `Color` | Read | LightCoral. |
| `LIGHT_CYAN` | `Color` | Read | LightCyan. |
| `LIGHT_GOLDENROD_YELLOW` | `Color` | Read | LightGoldenrodYellow. |
| `LIGHT_GRAY` | `Color` | Read | LightGray. |
| `LIGHT_GREEN` | `Color` | Read | LightGreen. |
| `LIGHT_PINK` | `Color` | Read | LightPink. |
| `LIGHT_SALMON` | `Color` | Read | LightSalmon. |
| `LIGHT_SEA_GREEN` | `Color` | Read | LightSeaGreen. |
| `LIGHT_SKY_BLUE` | `Color` | Read | LightSkyBlue. |
| `LIGHT_SLATE_GRAY` | `Color` | Read | LightSlateGray. |
| `LIGHT_STEEL_BLUE` | `Color` | Read | LightSteelBlue. |
| `LIGHT_YELLOW` | `Color` | Read | LightYellow. |
| `LIME` | `Color` | Read | Lime. |
| `LIME_GREEN` | `Color` | Read | LimeGreen. |
| `LINEN` | `Color` | Read | Linen. |
| `MAGENTA` | `Color` | Read | Magenta. |
| `MAROON` | `Color` | Read | Maroon. |
| `MEDIUM_AQUAMARINE` | `Color` | Read | MediumAquamarine. |
| `MEDIUM_BLUE` | `Color` | Read | MediumBlue. |
| `MEDIUM_ORCHID` | `Color` | Read | MediumOrchid. |
| `MEDIUM_PURPLE` | `Color` | Read | MediumPurple. |
| `MEDIUM_SEA_GREEN` | `Color` | Read | MediumSeaGreen. |
| `MEDIUM_SLATE_BLUE` | `Color` | Read | MediumSlateBlue. |
| `MEDIUM_SPRING_GREEN` | `Color` | Read | MediumSpringGreen. |
| `MEDIUM_TURQUOISE` | `Color` | Read | MediumTurquoise. |
| `MEDIUM_VIOLET_RED` | `Color` | Read | MediumVioletRed. |
| `MIDNIGHT_BLUE` | `Color` | Read | MidnightBlue. |
| `MINT_CREAM` | `Color` | Read | MintCream. |
| `MISTY_ROSE` | `Color` | Read | MistyRose. |
| `MOCCASIN` | `Color` | Read | Moccasin. |
| `NAVAJO_WHITE` | `Color` | Read | NavajoWhite. |
| `NAVY` | `Color` | Read | Navy. |
| `OLD_LACE` | `Color` | Read | OldLace. |
| `OLIVE` | `Color` | Read | Olive. |
| `OLIVE_DRAB` | `Color` | Read | OliveDrab. |
| `ORANGE` | `Color` | Read | Orange. |
| `ORANGE_RED` | `Color` | Read | OrangeRed. |
| `ORCHID` | `Color` | Read | Orchid. |
| `PALE_GOLDENROD` | `Color` | Read | PaleGoldenrod. |
| `PALE_GREEN` | `Color` | Read | PaleGreen. |
| `PALE_TURQUOISE` | `Color` | Read | PaleTurquoise. |
| `PALE_VIOLET_RED` | `Color` | Read | PaleVioletRed. |
| `PAPAYA_WHIP` | `Color` | Read | PapayaWhip. |
| `PEACH_PUFF` | `Color` | Read | PeachPuff. |
| `PERU` | `Color` | Read | Peru. |
| `PINK` | `Color` | Read | Pink. |
| `PLUM` | `Color` | Read | Plum. |
| `POWDER_BLUE` | `Color` | Read | PowderBlue. |
| `PURPLE` | `Color` | Read | Purple. |
| `RED` | `Color` | Read | Red. |
| `ROSY_BROWN` | `Color` | Read | RosyBrown. |
| `ROYAL_BLUE` | `Color` | Read | RoyalBlue. |
| `SADDLE_BROWN` | `Color` | Read | SaddleBrown. |
| `SALMON` | `Color` | Read | Salmon. |
| `SANDY_BROWN` | `Color` | Read | SandyBrown. |
| `SEA_GREEN` | `Color` | Read | SeaGreen. |
| `SEA_SHELL` | `Color` | Read | SeaShell. |
| `SIENNA` | `Color` | Read | Sienna. |
| `SILVER` | `Color` | Read | Silver. |
| `SKY_BLUE` | `Color` | Read | SkyBlue. |
| `SLATE_BLUE` | `Color` | Read | SlateBlue. |
| `SLATE_GRAY` | `Color` | Read | SlateGray. |
| `SNOW` | `Color` | Read | Snow. |
| `SPRING_GREEN` | `Color` | Read | SpringGreen. |
| `STEEL_BLUE` | `Color` | Read | SteelBlue. |
| `TAN` | `Color` | Read | Tan. |
| `TEAL` | `Color` | Read | Teal. |
| `THISTLE` | `Color` | Read | Thistle. |
| `TOMATO` | `Color` | Read | Tomato. |
| `TURQUOISE` | `Color` | Read | Turquoise. |
| `VIOLET` | `Color` | Read | Violet. |
| `WHEAT` | `Color` | Read | Wheat. |
| `WHITE` | `Color` | Read | White. |
| `WHITE_SMOKE` | `Color` | Read | WhiteSmoke. |
| `YELLOW` | `Color` | Read | Yellow. |
| `YELLOW_GREEN` | `Color` | Read | YellowGreen. |
| `EMPTY` | `Color` | Read | Empty (all zeros). |

## Methods

| Signature | Description |
|-----------|-------------|
| `Color(a: int, r: int, g: int, b: int)` | Initializes a new Color with the specified ARGB components. |
| `Color(r: int, g: int, b: int)` | Initializes a new Color with the specified RGB components and default alpha of 255. |
| `Color()` | Initializes a new Color with default ARGB components (opaque black). |
| `a()` → `int` | Gets the alpha component. |
| `getA()` → `int` | Gets the alpha component. |
| `r()` → `int` | Gets the red component. |
| `getR()` → `int` | Gets the red component. |
| `g()` → `int` | Gets the green component. |
| `getG()` → `int` | Gets the green component. |
| `b()` → `int` | Gets the blue component. |
| `getB()` → `int` | Gets the blue component. |
| `fromArgb(a: int, r: int, g: int, b: int)` → `Color` | Creates a new Color from the specified ARGB components. |
| `fromArgb(r: int, g: int, b: int)` → `Color` | Creates a new Color from the specified RGB components with alpha 255. |
| `fromArgb(argb: int)` → `Color` | Creates a new Color from a packed 32-bit ARGB value. |
| `toArgb()` → `int` | Packs this color into a 32-bit ARGB integer. |
| `isEmpty()` → `boolean` | Returns {@code true} if this color is empty (all components are zero). |
| `equals(obj: Object)` → `boolean` |  |
| `hashCode()` → `int` |  |
| `toString()` → `String` |  |

## See Also

- [Aspose.Slides — Enterprise API Reference](https://reference.aspose.com/slides/)