# `GSPalettes hasAttribute:inPalette:`

*Instance Method*

Checks if the specified palette index has the given attribute.

## Declaration

```swift
func hasAttribute(_ attribute: GSPalettes.Attribute, inPalette paletteIdx: UInt) -> Bool
```

```objc
- (BOOL) hasAttribute:(GSPalettesAttribute) attribute inPalette:(NSUInteger) paletteIdx;
```

```python
hasAttribute_inPalette_(attribute: GSPalettesAttribute, paletteIdx: int) -> bool
```

## Parameters

- `attribute` — The attribute to check.
- `paletteIdx` — The index of the palette.

## Return Value

YES if the palette has the attribute, NO otherwise.

