---
title: "LayerInfo"
description: "A single layer definition with metadata."
canonical_url: "https://www.rosette.dev/docs/api-reference/LayerInfo"
markdown_url: "https://www.rosette.dev/docs/api-reference/LayerInfo.md"
source_url: "https://github.com/PreFab-Photonics/rosette/blob/f086d7670645fd36c05362d696d442a2b2e74850/www/content/docs/api-reference/LayerInfo.mdx"
docs_channel: "main"
docs_revision: "f086d7670645fd36c05362d696d442a2b2e74850"
---

# LayerInfo

A single layer definition with metadata.

Import with `from rosette.project import LayerInfo`.

Combines the GDS layer identity (number, datatype) with display
properties (color, fill, opacity) and a human-readable description.

Use `info.layer` to get the underlying Layer for rosette APIs:

```python
layers = load_layer_map()
cell.add_polygon(poly, layers.silicon.layer)
```

## Attributes



### `name`

```python
name: str
```

Semantic name (e.g., `"silicon"`, `"text"`).





### `layer`

```python
layer: Layer
```

The underlying `Layer(number, datatype)`.





### `color`

```python
color: str
```

Hex color string (e.g., `"#ff69b4"`).





### `fill`

```python
fill: str
```

Fill pattern: `"solid"`, `"hatched"`, `"crosshatched"`, or `"dotted"`.





### `opacity`

```python
opacity: float
```

Fill opacity from 0.0 to 1.0.





### `description`

```python
description: str
```

Human-readable description.



## Methods



### `__init__`

```python
__init__(name, layer, color='#808080', fill='solid', opacity=0.7, description='') -> None
```

Create a new LayerInfo.



- **`name`** (`str`)

  Semantic name for the layer.





- **`layer`** (`Layer`)

  The GDS layer identity.





- **`color`** (`str`, default `'#808080'`)

  Hex color string.





- **`fill`** (`str`, default `'solid'`)

  Fill pattern.





- **`opacity`** (`float`, default `0.7`)

  Fill opacity.





- **`description`** (`str`, default `''`)

  Human-readable description.





**Returns:** `None`