import { Meta } from '@storybook/addon-docs/blocks'

<Meta title='@dxtmisha/en/styles/color/| functions/getPaletteItem - Palette search chain'/>

# `getPaletteItem`

The function generates a nested CSS variable chain (using the `var()` fallback parameter) to search for a color across multiple palette nodes.

**Parameters:**
- `$palette: List | String` — list of palette variable names or a single name.
- `$color: Color | String` — the fallback color if no palette variables are defined.

**Returns:**
- `String` — a nested `var(--name1, var(--name2, ...))` string.

## Example

```scss
@use '@dxtmisha/styles';

$chain: styles.getPaletteItem(('theme-color', 'sys-color'), #ff0000); 
// var(--theme-color, var(--sys-color, 255, 0, 0))
```
