<!-- Generated by tools/SharpCell.Grid.Docs from the XML documentation comments. Do not edit; run the tool with 'generate'. -->

# GridColor

```csharp
public readonly struct GridColor
```

Namespace `SharpCell.Grid` · package `SharpCell.Grid`

An opaque or translucent sRGB colour.

## Constructors

<a id="ctor-byte-byte-byte-byte"></a>
### GridColor(byte, byte, byte, byte)

```csharp
public GridColor(byte R, byte G, byte B, byte A = 255)
```

An opaque or translucent sRGB colour.

**Parameters**

- `R`: Red, 0 to 255.
- `G`: Green, 0 to 255.
- `B`: Blue, 0 to 255.
- `A`: Opacity, 0 (transparent) to 255 (opaque).

## Properties

<a id="a"></a>
### A

```csharp
public byte A { get; init; }
```

Opacity, 0 (transparent) to 255 (opaque).

<a id="b"></a>
### B

```csharp
public byte B { get; init; }
```

Blue, 0 to 255.

<a id="g"></a>
### G

```csharp
public byte G { get; init; }
```

Green, 0 to 255.

<a id="r"></a>
### R

```csharp
public byte R { get; init; }
```

Red, 0 to 255.

## Methods

<a id="fromrgb-int"></a>
### FromRgb(int)

```csharp
public static GridColor FromRgb(int rgb)
```

An opaque colour from a 0xRRGGBB number.
