---
Product: Aspose.PDF
Platform: net
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/net/Color-Pdf
---

# Color

## Overview

`Color` is a class in Aspose.PDF FOSS for .NET.

Represents a color value used in PDF documents.

This class provides 14 methods for working with Color objects in .NET programs.
Available methods include: `Color`, `Equals`, `FromArgb`, `FromCmyk`, `FromGray`, `FromRgb`, `GetHashCode`, `Parse`, `ToRgb`, `ToRgbArray`, `ToString`.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: `A`, `AByte`, `AliceBlue`, `AntiqueWhite`, `Aqua`, `Aquamarine`, and 146 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `R` | `byte` | Read | RGB components in 0–255 range. |
| `G` | `byte` | Read | Gets the g. |
| `B` | `byte` | Read | Gets the b. |
| `AByte` | `byte` | Read | Byte-typed alpha (0–255). |
| `A` | `double` | Read | Alpha in 0..1 range. |
| `IsEmpty` | `bool` | Read | Whether this color has been set (non-empty). |
| `Data` | `double[]?` | Read | The color space data (for advanced use). |
| `PatternColorSpace` | `Aspose.Pdf.Drawing.PatternColorSpace?` | Read/Write | The pattern color space (for advanced use). |
| `ColorSpace` | `Aspose.Pdf.ColorSpace` | Read | Top-level Aspose.Pdf.ColorSpace selector. |
| `ColorType` | `ColorType` | Read/Write | Internal colour-space marker (ColorType.Rgb / Cmyk / Gray). |
| `Transparent` | `Color` | Read | Gets the transparent. |
| `AliceBlue` | `Color` | Read | Gets the alice blue. |
| `AntiqueWhite` | `Color` | Read | Gets the antique white. |
| `Aqua` | `Color` | Read | Gets the aqua. |
| `Aquamarine` | `Color` | Read | Gets the aquamarine. |
| `Azure` | `Color` | Read | Gets the azure. |
| `Beige` | `Color` | Read | Gets the beige. |
| `Bisque` | `Color` | Read | Gets the bisque. |
| `Black` | `Color` | Read | Gets the black. |
| `BlanchedAlmond` | `Color` | Read | Gets the blanched almond. |
| `Blue` | `Color` | Read | Gets the blue. |
| `BlueViolet` | `Color` | Read | Gets the blue violet. |
| `Brown` | `Color` | Read | Gets the brown. |
| `BurlyWood` | `Color` | Read | Gets the burly wood. |
| `CadetBlue` | `Color` | Read | Gets the cadet blue. |
| `Chartreuse` | `Color` | Read | Gets the chartreuse. |
| `Chocolate` | `Color` | Read | Gets the chocolate. |
| `Coral` | `Color` | Read | Gets the coral. |
| `CornflowerBlue` | `Color` | Read | Gets the cornflower blue. |
| `Cornsilk` | `Color` | Read | Gets the cornsilk. |
| `Crimson` | `Color` | Read | Gets the crimson. |
| `Cyan` | `Color` | Read | Gets the cyan. |
| `DarkBlue` | `Color` | Read | Gets the dark blue. |
| `DarkCyan` | `Color` | Read | Gets the dark cyan. |
| `DarkGoldenrod` | `Color` | Read | Gets the dark goldenrod. |
| `DarkGray` | `Color` | Read | Gets the dark gray. |
| `DarkGreen` | `Color` | Read | Gets the dark green. |
| `DarkKhaki` | `Color` | Read | Gets the dark khaki. |
| `DarkMagenta` | `Color` | Read | Gets the dark magenta. |
| `DarkOliveGreen` | `Color` | Read | Gets the dark olive green. |
| `DarkOrange` | `Color` | Read | Gets the dark orange. |
| `DarkOrchid` | `Color` | Read | Gets the dark orchid. |
| `DarkRed` | `Color` | Read | Gets the dark red. |
| `DarkSalmon` | `Color` | Read | Gets the dark salmon. |
| `DarkSeaGreen` | `Color` | Read | Gets the dark sea green. |
| `DarkSlateBlue` | `Color` | Read | Gets the dark slate blue. |
| `DarkSlateGray` | `Color` | Read | Gets the dark slate gray. |
| `DarkTurquoise` | `Color` | Read | Gets the dark turquoise. |
| `DarkViolet` | `Color` | Read | Gets the dark violet. |
| `DeepPink` | `Color` | Read | Gets the deep pink. |
| `DeepSkyBlue` | `Color` | Read | Gets the deep sky blue. |
| `DimGray` | `Color` | Read | Gets the dim gray. |
| `DodgerBlue` | `Color` | Read | Gets the dodger blue. |
| `Firebrick` | `Color` | Read | Gets the firebrick. |
| `FloralWhite` | `Color` | Read | Gets the floral white. |
| `ForestGreen` | `Color` | Read | Gets the forest green. |
| `Fuchsia` | `Color` | Read | Gets the fuchsia. |
| `Gainsboro` | `Color` | Read | Gets the gainsboro. |
| `GhostWhite` | `Color` | Read | Gets the ghost white. |
| `Gold` | `Color` | Read | Gets the gold. |
| `Goldenrod` | `Color` | Read | Gets the goldenrod. |
| `Gray` | `Color` | Read | Gets the gray. |
| `Green` | `Color` | Read | Gets the green. |
| `GreenYellow` | `Color` | Read | Gets the green yellow. |
| `Honeydew` | `Color` | Read | Gets the honeydew. |
| `HotPink` | `Color` | Read | Gets the hot pink. |
| `IndianRed` | `Color` | Read | Gets the indian red. |
| `Indigo` | `Color` | Read | Gets the indigo. |
| `Ivory` | `Color` | Read | Gets the ivory. |
| `Khaki` | `Color` | Read | Gets the khaki. |
| `Lavender` | `Color` | Read | Gets the lavender. |
| `LavenderBlush` | `Color` | Read | Gets the lavender blush. |
| `LawnGreen` | `Color` | Read | Gets the lawn green. |
| `LemonChiffon` | `Color` | Read | Gets the lemon chiffon. |
| `LightBlue` | `Color` | Read | Gets the light blue. |
| `LightCoral` | `Color` | Read | Gets the light coral. |
| `LightCyan` | `Color` | Read | Gets the light cyan. |
| `LightGoldenrodYellow` | `Color` | Read | Gets the light goldenrod yellow. |
| `LightGray` | `Color` | Read | Gets the light gray. |
| `LightGreen` | `Color` | Read | Gets the light green. |
| `LightPink` | `Color` | Read | Gets the light pink. |
| `LightSalmon` | `Color` | Read | Gets the light salmon. |
| `LightSeaGreen` | `Color` | Read | Gets the light sea green. |
| `LightSkyBlue` | `Color` | Read | Gets the light sky blue. |
| `LightSlateGray` | `Color` | Read | Gets the light slate gray. |
| `LightSteelBlue` | `Color` | Read | Gets the light steel blue. |
| `LightYellow` | `Color` | Read | Gets the light yellow. |
| `Lime` | `Color` | Read | Gets the lime. |
| `LimeGreen` | `Color` | Read | Gets the lime green. |
| `Linen` | `Color` | Read | Gets the linen. |
| `Magenta` | `Color` | Read | Gets the magenta. |
| `Maroon` | `Color` | Read | Gets the maroon. |
| `MediumAquamarine` | `Color` | Read | Gets the medium aquamarine. |
| `MediumBlue` | `Color` | Read | Gets the medium blue. |
| `MediumOrchid` | `Color` | Read | Gets the medium orchid. |
| `MediumPurple` | `Color` | Read | Gets the medium purple. |
| `MediumSeaGreen` | `Color` | Read | Gets the medium sea green. |
| `MediumSlateBlue` | `Color` | Read | Gets the medium slate blue. |
| `MediumSpringGreen` | `Color` | Read | Gets the medium spring green. |
| `MediumTurquoise` | `Color` | Read | Gets the medium turquoise. |
| `MediumVioletRed` | `Color` | Read | Gets the medium violet red. |
| `MidnightBlue` | `Color` | Read | Gets the midnight blue. |
| `MintCream` | `Color` | Read | Gets the mint cream. |
| `MistyRose` | `Color` | Read | Gets the misty rose. |
| `Moccasin` | `Color` | Read | Gets the moccasin. |
| `NavajoWhite` | `Color` | Read | Gets the navajo white. |
| `Navy` | `Color` | Read | Gets the navy. |
| `OldLace` | `Color` | Read | Gets the old lace. |
| `Olive` | `Color` | Read | Gets the olive. |
| `OliveDrab` | `Color` | Read | Gets the olive drab. |
| `Orange` | `Color` | Read | Gets the orange. |
| `OrangeRed` | `Color` | Read | Gets the orange red. |
| `Orchid` | `Color` | Read | Gets the orchid. |
| `PaleGoldenrod` | `Color` | Read | Gets the pale goldenrod. |
| `PaleGreen` | `Color` | Read | Gets the pale green. |
| `PaleTurquoise` | `Color` | Read | Gets the pale turquoise. |
| `PaleVioletRed` | `Color` | Read | Gets the pale violet red. |
| `PapayaWhip` | `Color` | Read | Gets the papaya whip. |
| `PeachPuff` | `Color` | Read | Gets the peach puff. |
| `Peru` | `Color` | Read | Gets the peru. |
| `Pink` | `Color` | Read | Gets the pink. |
| `Plum` | `Color` | Read | Gets the plum. |
| `PowderBlue` | `Color` | Read | Gets the powder blue. |
| `Purple` | `Color` | Read | Gets the purple. |
| `Red` | `Color` | Read | Gets the red. |
| `RosyBrown` | `Color` | Read | Gets the rosy brown. |
| `RoyalBlue` | `Color` | Read | Gets the royal blue. |
| `SaddleBrown` | `Color` | Read | Gets the saddle brown. |
| `Salmon` | `Color` | Read | Gets the salmon. |
| `SandyBrown` | `Color` | Read | Gets the sandy brown. |
| `SeaGreen` | `Color` | Read | Gets the sea green. |
| `SeaShell` | `Color` | Read | Gets the sea shell. |
| `Sienna` | `Color` | Read | Gets the sienna. |
| `Silver` | `Color` | Read | Gets the silver. |
| `SkyBlue` | `Color` | Read | Gets the sky blue. |
| `SlateBlue` | `Color` | Read | Gets the slate blue. |
| `SlateGray` | `Color` | Read | Gets the slate gray. |
| `Snow` | `Color` | Read | Gets the snow. |
| `SpringGreen` | `Color` | Read | Gets the spring green. |
| `SteelBlue` | `Color` | Read | Gets the steel blue. |
| `Tan` | `Color` | Read | Gets the tan. |
| `Teal` | `Color` | Read | Gets the teal. |
| `Thistle` | `Color` | Read | Gets the thistle. |
| `Tomato` | `Color` | Read | Gets the tomato. |
| `Turquoise` | `Color` | Read | Gets the turquoise. |
| `Violet` | `Color` | Read | Gets the violet. |
| `Wheat` | `Color` | Read | Gets the wheat. |
| `White` | `Color` | Read | Gets the white. |
| `WhiteSmoke` | `Color` | Read | Gets the white smoke. |
| `Yellow` | `Color` | Read | Gets the yellow. |
| `YellowGreen` | `Color` | Read | Gets the yellow green. |
| `Empty` | `Color` | Read | Gets the empty. |

## Methods

| Signature | Description |
|-----------|-------------|
| `Color()` | Creates an empty (transparent black) color. |
| `Equals(obj: object?)` | Calls Equals on this Color instance. |
| `GetHashCode()` | Calls GetHashCode on this Color instance. |
| `FromArgb(r: int, g: int, b: int)` | Calls FromArgb on this Color instance. |
| `FromArgb(a: int, r: int, g: int, b: int)` |  |
| `FromRgb(r: int, g: int, b: int)` | Calls FromRgb on this Color instance. |
| `FromRgb(r: double, g: double, b: double)` |  |
| `FromRgb(color: System.Drawing.Color)` |  |
| `FromCmyk(c: double, m: double, y: double, k: double)` | Calls FromCmyk on this Color instance. |
| `FromGray(g: double)` | Calls FromGray on this Color instance. |
| `Parse(value: string)` | Calls Parse on this Color instance. |
| `ToRgbArray()` | Convert to PDF color array [r, g, b] in 0–1 range. |
| `ToRgb()` | Calls ToRgb on this Color instance. |
| `ToString()` | Calls ToString on this Color instance. |

## See Also

- [Aspose.PDF for .NET — Enterprise API Reference](https://reference.aspose.com/pdf/net/)