# get_color_mapping

> **Function** in `langchain_core`

📖 [View in docs](https://reference.langchain.com/python/langchain-core/utils/input/get_color_mapping)

Get mapping for items to a support color.

## Signature

```python
get_color_mapping(
    items: list[str],
    excluded_colors: list | None = None,
) -> dict[str, str]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `items` | `list[str]` | Yes | The items to map to colors. |
| `excluded_colors` | `list \| None` | No | The colors to exclude. (default: `None`) |

## Returns

`dict[str, str]`

The mapping of items to colors.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/f0c5a28fa05adcda89aebcb449d897245ab21fa4/libs/core/langchain_core/utils/input.py#L14)