Table of Contents

Struct ColorBgra

Namespace
PaintDotNet
Assembly
PaintDotNet.Core.dll

Defines a 32-bit BGRA color value. This is mostly used by legacy "classic" plugins, and is has been superceded by ColorBgra32.

public struct ColorBgra : INaturalPixelInfo<ColorBgra>, INaturalPixelInfo, IPixelInfo, IInternalImpl, IEquatable<ColorBgra>
Implements
Inherited Members

Fields

A
AlphaChannel
B
Bgra

Lets you change B, G, R, and A at the same time.

BitsPerPixel
BlueChannel
G
GreenChannel
R
RedChannel
SizeOf

Properties

AliceBlue
AntiqueWhite
Aqua
Aquamarine
Azure
Beige
Bgr
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
DarkOrchid
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
Firebrick
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
this[int]

Gets or sets the byte value of the specified color channel.

Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
Maroon
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
Peru
Pink
Plum
PowderBlue
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
SeaGreen
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
SteelBlue
Tan
Teal
Thistle
Tomato
Transparent
TransparentBlack
Turquoise
Violet
Wheat
White
WhiteSmoke
Yellow
YellowGreen
Zero

Methods

BgraToUInt32(byte, byte, byte, byte)

Packs color and alpha values into a 32-bit integer.

BgraToUInt32(int, int, int, int)

Packs color and alpha values into a 32-bit integer.

Blend(ColorBgra*, int)

Smoothly blends the given colors together, assuming equal weighting for each one.

Blend(ColorBgra, ColorBgra, byte)

Smoothly blends between two colors.

Blend(ColorBgra[])
Blend(ColorBgra[], int, int)
BlendColors4Fast(ColorBgra, ColorBgra, ColorBgra, ColorBgra)
BlendColors4W16IP(ColorBgra, uint, ColorBgra, uint, ColorBgra, uint, ColorBgra, uint)

Blends four colors together based on the given weight values.

BlendColorsWAIP(ColorBgra[], uint[])

Blends the colors based on the given weight values.

BlendColorsWFP(ColorBgra[], double[])

Blends the colors based on the given weight values.

ConvertFromPremultipliedAlpha()
ConvertToPremultipliedAlpha()
Equals(ColorBgra)
Equals(object?)

Compares two ColorBgra instance to determine if they are equal.

FromBgr(byte, byte, byte)

Creates a new ColorBgra instance with the given color values, and 255 for alpha.

FromBgra(byte, byte, byte, byte)

Creates a new ColorBgra instance with the given color and alpha values.

FromBgraClamped(int, int, int, int)

Creates a new ColorBgra instance with the given color and alpha values.

FromBgraClamped(float, float, float, float)

Creates a new ColorBgra instance with the given color and alpha values.

FromColor(Color)

Constructs a new ColorBgra instance from the values in the given Color instance.

FromOpaqueInt32(int)

Constructs a new ColorBgra instance given a 32-bit signed integer that represents an R,G,B triple. Alpha will be initialized to 255.

FromUInt32(uint)

Constructs a new ColorBgra instance with the given 32-bit value.

GetHashCode()

Returns a hash code for this color value.

GetIntensity()

Gets the luminance intensity of the pixel based on the values of the red, green, and blue components. Alpha is ignored.

GetIntensityByte()

Gets the luminance intensity of the pixel based on the values of the red, green, and blue components. Alpha is ignored.

Lerp(ColorBgra, ColorBgra, byte)
Lerp(ColorBgra, ColorBgra, double)

Linearly interpolates between two color values.

Lerp(ColorBgra, ColorBgra, float)

Linearly interpolates between two color values.

NewAlpha(byte)

Returns a new ColorBgra with the same color values but with a new alpha component value.

Overwrite(ColorBgra*, ColorBgra*, byte*, int)
Overwrite(ColorBgra, ColorBgra, byte)
ParseHexString(string)
ToColor()

Converts this ColorBgra instance to a Color instance.

ToHexString()
ToOpaqueInt32(ColorBgra)
ToString()

Operators

operator ==(ColorBgra, ColorBgra)

Compares two ColorBgra instance to determine if they are equal.

explicit operator SrgbColorA(ColorBgra)
explicit operator uint(ColorBgra)

Casts a ColorBgra to a UInt32.

explicit operator ColorBgra(ColorBgr32)
explicit operator ColorBgra(ColorRgb32)
explicit operator ColorBgra(uint)

Casts a UInt32 to a ColorBgra.

implicit operator ColorBgra32(ColorBgra)
implicit operator ColorRgba128Float(ColorBgra)
implicit operator Color(ColorBgra)
implicit operator ColorBgra(ColorBgr24)
implicit operator ColorBgra(ColorBgra32)
implicit operator ColorBgra(ColorRgb24)
implicit operator ColorBgra(ColorRgba32)
implicit operator ColorBgra(SrgbColor)
implicit operator ColorBgra(SrgbColorA)
implicit operator ColorBgra(Color)
operator !=(ColorBgra, ColorBgra)

Compares two ColorBgra instance to determine if they are not equal.