Table of Contents

Struct Color

Namespace
Gym.Rendering
Assembly
Gym.Rendering.dll

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

R byte

Red, 0–255.

G byte

Green, 0–255.

B byte

Blue, 0–255.

A byte

Alpha, 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

byte

B

Blue, 0–255.

public byte B { get; init; }

Property Value

byte

G

Green, 0–255.

public byte G { get; init; }

Property Value

byte

R

Red, 0–255.

public byte R { get; init; }

Property Value

byte