Click or drag to resize

Color Structure

Represents a color with RGBA (Red, Green, Blue, and Alpha) components

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.4.0
Syntax
[TypeConverterAttribute(typeof(ColorConverter))]
public struct Color : IEquatable<Color>, 
	IComparable<Color>

The Color type exposes the following members.

Constructors
  NameDescription
Public methodColor(Color, NullableSingle)
Initializes a new instance of the Color object as a copy of the specified color
Public methodColor(Single, Single, Single, Single)
Initializes a new instance of the Color object with the specified red, green, blue, and alpha components
Top
Properties
  NameDescription
Public propertyA
Gets or sets the alpha/opacity (0-1)
Public propertyAb
Gets or sets the alpha/opacity component as a byte of a 32-bit color (0-255)
Public propertyB
Gets or sets the blue (0-1)
Public propertyBb
Gets or sets the blue component as a byte of a 32-bit color (0-255)
Public propertyG
Gets or sets the green (0-1)
Public propertyGb
Gets or sets the green component as a byte of a 32-bit color (0-255)
Public propertyR
Gets or sets the red component (0-1)
Public propertyRb
Gets or sets the red component as a byte of a 32-bit color (0-255)
Top
Methods
  NameDescription
Public methodStatic memberBlend
Blends the blendColor onto the specified baseColor
Public methodStatic memberDistance
Calculates the distance of the two colors in the RGB scale
Public methodEquals(Object)
Tests if the specified object has the same value as this Color
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Color)
Compares the specified color for equality
Public methodStatic memberFromArgb(Int32)
Creates a Color from a 32-bit ARGB value
Public methodStatic memberFromArgb(Int32, Int32, Int32, Int32)
Creates a color from 8-bit ARGB components
Public methodStatic memberFromElementId
Creates a new color from an Element ID value
Public methodStatic memberFromGrayscale
Creates a Color with a specified value for the Red, Green, and Blue components
Public methodStatic memberFromRgb
Creates a Color from a 24-bit RGB value
Public methodGetHashCode
Gets the hash code for this Color
(Overrides ValueTypeGetHashCode.)
Public methodInvert
Inverts the RGB color values
Public methodStatic memberParse
Converts a string into a new instance of a Color
Public methodToArgb
Converts this color to a 32-bit ARGB value.
Public methodToCMYK
Converts this RGB color to the CMYK colorspace.
Public methodToElementId
Converts this color to an Element ID value
Public methodToHex
Converts this color to a hex representation
Public methodToHSB
Converts this RGB color to the HSB colorspace.
Public methodToHSL
Converts this RGB color to the HSL colorspace.
Public methodToString
Converts this object to a string
(Overrides ValueTypeToString.)
Public methodStatic memberTryParse
Converts the specified string to a color
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares two Color structs for equality
Public operatorStatic memberInequality
Compares two Color structs for inequality
Top
See Also