Color

Overview

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

Represents a color value used in PDF documents.

This class declares 14 methods for Color objects in .NET programs. Available methods include: Color, Equals, FromArgb, FromCmyk, FromGray, FromRgb, GetHashCode, Parse, ToRgb, ToRgbArray, ToString. 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

NameTypeAccessDescription
RbyteReadRGB components in 0–255 range.
GbyteReadGets the green component (0-255).
BbyteReadGets the blue component (0-255).
ABytebyteReadByte-typed alpha (0–255).
AdoubleReadAlpha in 0..1 range (public surface).
IsEmptyboolReadWhether this color has been set (non-empty).
Datadouble[]?ReadThe colour-space component values: one entry for DeviceGray, three for DeviceRGB.
PatternColorSpaceAspose.Pdf.Drawing.PatternColorSpace?Read/WriteThe pattern color space (for advanced use).
ColorSpaceAspose.Pdf.ColorSpaceReadTop-level Aspose.Pdf.ColorSpace selector.
ColorTypeColorTypeRead/WriteFOSS-internal colour-space marker (ColorType.Rgb / Cmyk / Gray).
TransparentColorReadGets a fully transparent colour (alpha 0, RGB 255, 255, 255).
AliceBlueColorReadGets the alice blue.
AntiqueWhiteColorReadGets the opaque AntiqueWhite colour (RGB 250, 235, 215).
AquaColorReadGets the opaque Aqua colour (RGB 0, 255, 255).
AquamarineColorReadGets the aquamarine.
AzureColorReadGets the opaque Azure colour (RGB 240, 255, 255).
BeigeColorReadGets the opaque Beige colour (RGB 245, 245, 220).
BisqueColorReadGets the bisque.
BlackColorReadGets the opaque Black colour (RGB 0, 0, 0).
BlanchedAlmondColorReadGets the blanched almond.
BlueColorReadGets the opaque Blue colour (RGB 0, 0, 255).
BlueVioletColorReadGets the opaque BlueViolet colour (RGB 138, 43, 226).
BrownColorReadGets the brown.
BurlyWoodColorReadGets the burly wood.
CadetBlueColorReadGets the cadet blue.
ChartreuseColorReadGets the chartreuse.
ChocolateColorReadGets the chocolate.
CoralColorReadGets the coral.
CornflowerBlueColorReadGets the cornflower blue.
CornsilkColorReadGets the cornsilk.
CrimsonColorReadGets the crimson.
CyanColorReadGets the opaque Cyan colour (RGB 0, 255, 255).
DarkBlueColorReadGets the opaque DarkBlue colour (RGB 0, 0, 139).
DarkCyanColorReadGets the opaque DarkCyan colour (RGB 0, 139, 139).
DarkGoldenrodColorReadGets the dark goldenrod.
DarkGrayColorReadGets the opaque DarkGray colour (RGB 169, 169, 169).
DarkGreenColorReadGets the opaque DarkGreen colour (RGB 0, 100, 0).
DarkKhakiColorReadGets the opaque DarkKhaki colour (RGB 189, 183, 107).
DarkMagentaColorReadGets the opaque DarkMagenta colour (RGB 139, 0, 139).
DarkOliveGreenColorReadGets the dark olive green.
DarkOrangeColorReadGets the dark orange.
DarkOrchidColorReadGets the dark orchid.
DarkRedColorReadGets the opaque DarkRed colour (RGB 139, 0, 0).
DarkSalmonColorReadGets the dark salmon.
DarkSeaGreenColorReadGets the dark sea green.
DarkSlateBlueColorReadGets the dark slate blue.
DarkSlateGrayColorReadGets the opaque DarkSlateGray colour (RGB 47, 79, 79).
DarkTurquoiseColorReadGets the dark turquoise.
DarkVioletColorReadGets the dark violet.
DeepPinkColorReadGets the deep pink.
DeepSkyBlueColorReadGets the deep sky blue.
DimGrayColorReadGets the dim gray.
DodgerBlueColorReadGets the dodger blue.
FirebrickColorReadGets the firebrick.
FloralWhiteColorReadGets the floral white.
ForestGreenColorReadGets the forest green.
FuchsiaColorReadGets the fuchsia.
GainsboroColorReadGets the gainsboro.
GhostWhiteColorReadGets the ghost white.
GoldColorReadGets the gold.
GoldenrodColorReadGets the goldenrod.
GrayColorReadGets the opaque Gray colour (RGB 128, 128, 128).
GreenColorReadGets the opaque Green colour (RGB 0, 128, 0).
GreenYellowColorReadGets the opaque GreenYellow colour (RGB 173, 255, 47).
HoneydewColorReadGets the honeydew.
HotPinkColorReadGets the hot pink.
IndianRedColorReadGets the indian red.
IndigoColorReadGets the indigo.
IvoryColorReadGets the ivory.
KhakiColorReadGets the khaki.
LavenderColorReadGets the lavender.
LavenderBlushColorReadGets the lavender blush.
LawnGreenColorReadGets the lawn green.
LemonChiffonColorReadGets the lemon chiffon.
LightBlueColorReadGets the opaque LightBlue colour (RGB 173, 216, 230).
LightCoralColorReadGets the opaque LightCoral colour (RGB 240, 128, 128).
LightCyanColorReadGets the light cyan.
LightGoldenrodYellowColorReadGets the opaque LightGoldenrodYellow colour (RGB 250, 250, 210).
LightGrayColorReadGets the opaque LightGray colour (RGB 211, 211, 211).
LightGreenColorReadGets the opaque LightGreen colour (RGB 144, 238, 144).
LightPinkColorReadGets the light pink.
LightSalmonColorReadGets the light salmon.
LightSeaGreenColorReadGets the opaque LightSeaGreen colour (RGB 32, 178, 170).
LightSkyBlueColorReadGets the light sky blue.
LightSlateGrayColorReadGets the light slate gray.
LightSteelBlueColorReadGets the light steel blue.
LightYellowColorReadGets the opaque LightYellow colour (RGB 255, 255, 224).
LimeColorReadGets the lime.
LimeGreenColorReadGets the lime green.
LinenColorReadGets the linen.
MagentaColorReadGets the opaque Magenta colour (RGB 255, 0, 255).
MaroonColorReadGets the opaque Maroon colour (RGB 128, 0, 0).
MediumAquamarineColorReadGets the medium aquamarine.
MediumBlueColorReadGets the medium blue.
MediumOrchidColorReadGets the medium orchid.
MediumPurpleColorReadGets the medium purple.
MediumSeaGreenColorReadGets the medium sea green.
MediumSlateBlueColorReadGets the medium slate blue.
MediumSpringGreenColorReadGets the medium spring green.
MediumTurquoiseColorReadGets the medium turquoise.
MediumVioletRedColorReadGets the medium violet red.
MidnightBlueColorReadGets the midnight blue.
MintCreamColorReadGets the mint cream.
MistyRoseColorReadGets the opaque MistyRose colour (RGB 255, 228, 225).
MoccasinColorReadGets the moccasin.
NavajoWhiteColorReadGets the navajo white.
NavyColorReadGets the opaque Navy colour (RGB 0, 0, 128).
OldLaceColorReadGets the old lace.
OliveColorReadGets the olive.
OliveDrabColorReadGets the olive drab.
OrangeColorReadGets the orange.
OrangeRedColorReadGets the orange red.
OrchidColorReadGets the orchid.
PaleGoldenrodColorReadGets the pale goldenrod.
PaleGreenColorReadGets the pale green.
PaleTurquoiseColorReadGets the pale turquoise.
PaleVioletRedColorReadGets the pale violet red.
PapayaWhipColorReadGets the papaya whip.
PeachPuffColorReadGets the peach puff.
PeruColorReadGets the peru.
PinkColorReadGets the pink.
PlumColorReadGets the plum.
PowderBlueColorReadGets the powder blue.
PurpleColorReadGets the purple.
RedColorReadGets the opaque Red colour (RGB 255, 0, 0).
RosyBrownColorReadGets the rosy brown.
RoyalBlueColorReadGets the royal blue.
SaddleBrownColorReadGets the saddle brown.
SalmonColorReadGets the salmon.
SandyBrownColorReadGets the sandy brown.
SeaGreenColorReadGets the sea green.
SeaShellColorReadGets the sea shell.
SiennaColorReadGets the sienna.
SilverColorReadGets the silver.
SkyBlueColorReadGets the sky blue.
SlateBlueColorReadGets the slate blue.
SlateGrayColorReadGets the slate gray.
SnowColorReadGets the snow.
SpringGreenColorReadGets the spring green.
SteelBlueColorReadGets the steel blue.
TanColorReadGets the tan.
TealColorReadGets the teal.
ThistleColorReadGets the thistle.
TomatoColorReadGets the opaque Tomato colour (RGB 255, 99, 71).
TurquoiseColorReadGets the turquoise.
VioletColorReadGets the opaque Violet colour (RGB 238, 130, 238).
WheatColorReadGets the wheat.
WhiteColorReadGets the opaque White colour (RGB 255, 255, 255).
WhiteSmokeColorReadGets the opaque WhiteSmoke colour (RGB 245, 245, 245).
YellowColorReadGets the opaque Yellow colour (RGB 255, 255, 0).
YellowGreenColorReadGets the yellow green.
EmptyColorReadGets the empty.

Methods

SignatureDescription
Color()Creates an empty (transparent black) color.
Color(components: double[])Create a colour from raw colour-space components (one entry = DeviceGray, three = DeviceRGB), keeping the exact component values in Data — the shape a 3D view’s /BG colour array carries.
Equals(obj: object?)Calls Equals(obj) on this Color instance.
GetHashCode()Calls GetHashCode on this Color instance.
FromArgb(r: int, g: int, b: int)Creates an opaque colour from red, green and blue components in the range 0-255.
FromArgb(a: int, r: int, g: int, b: int)Creates a colour from alpha, red, green and blue components in the range 0-255 (alpha 0 is fully transparent).
FromRgb(r: double, g: double, b: double)Creates an opaque colour from red, green and blue components in the range 0.0-1.0; each is rounded to an 8-bit channel.
FromRgb(color: System.Drawing.Color)Creates a colour from a System.Drawing.Color, keeping its alpha, red, green and blue values.
FromCmyk(c: double, m: double, y: double, k: double)Calls FromCmyk(c, m, y, k) on this Color instance.
FromGray(g: double)Calls FromGray(g) on this Color instance.
Parse(value: string)Parses a hex colour string: RRGGBB (opaque) or AARRGGBB, with or without a leading #.
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

 English