Struct Color
An RGBA colour as pygame takes it: (r, g, b) is opaque (A 255) and (r, g, b, a)
blends with weight a. Gymnasium passes 3-tuples, so its primitives draw opaque unless anti-aliasing weights
the edge pixels.
public readonly record struct Color : IEquatable<Color>
- Implements
- Inherited Members
- Extension Methods
Constructors
Color(byte, byte, byte, byte)
An RGBA colour as pygame takes it: (r, g, b) is opaque (A 255) and (r, g, b, a)
blends with weight a. Gymnasium passes 3-tuples, so its primitives draw opaque unless anti-aliasing weights
the edge pixels.
public Color(byte R, byte G, byte B, byte A = 255)
Parameters
RbyteRed, 0–255.
GbyteGreen, 0–255.
BbyteBlue, 0–255.
AbyteAlpha, 0–255; 255 overwrites, anything lower blends with the surface (
d + (s - d) * a / 256, floored).
Properties
A
Alpha, 0–255; 255 overwrites, anything lower blends with the surface (d + (s - d) * a / 256, floored).
public byte A { get; init; }
Property Value
B
Blue, 0–255.
public byte B { get; init; }
Property Value
G
Green, 0–255.
public byte G { get; init; }
Property Value
R
Red, 0–255.
public byte R { get; init; }