Color class

Color class

Represents a fill or overlay color used in redaction options.

The Color type exposes the following members:

Constructors

Constructor Description
init

Methods

Method Description
equals Compares channel values with another redaction color.
equals Compares the color with another object.
from_argb Builds a color from a packed 32-bit value in ARGB order.
from_argb Builds a color from separate channel values.
from_name Creates a color from the specified name of a known color.
get_hash_code Returns a hash code based on the packed ARGB value.
to_argb Returns the color as a packed 32-bit ARGB value.
to_string Returns channel values in a readable form.

Properties

Property Description
a The opacity of the color. 0 is fully transparent, 255 is fully opaque.
b The blue channel intensity.
g The green channel intensity.
is_named_color The color indicates whether it is a known named color.
name The name of a known color, or the ARGB value in hexadecimal format if the color is not named.
r The red channel intensity.

Fields

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

Example

from groupdocs.redaction.options.drawing import Color

# Use a predefined color
black_box = Color.black

# Create a custom ARGB color
custom_color = Color.from_argb(255, 220, 20, 60)

Guides

Task guides that use Color:

See Also