# ShapeCategoryColour

Colour by category: a field's value picks the class.

This is an interface exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import type { ShapeCategoryColour } from "@mapcairn/core";
 
interface ShapeCategoryColour
```

## Properties

### categories

```ts
readonly categories: readonly ShapeCategory[];
```

The categories, each with a value, a label and a colour.

### field

```ts
readonly field: string;
```

The tile property or decoded field whose value picks the category.

### kind

```ts
readonly kind: "category";
```

Tells a category rule from the other shape colour rules.

### other

```ts
readonly other: ShapeMarks & {
        readonly label: DefinitionText;
        readonly colour: PaletteSlot;
    };
```

Used for a value no category names.

## See also

- [`ShapeCategory`](https://docs.mapcairn.com/api/core/ShapeCategory.md)
- [`ShapeMarks`](https://docs.mapcairn.com/api/core/ShapeMarks.md)
- [`DefinitionText`](https://docs.mapcairn.com/api/core/DefinitionText.md)
- [`PaletteSlot`](https://docs.mapcairn.com/api/core/PaletteSlot.md)

Source: [packages/core/src/layers/definition.ts:423](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layers/definition.ts#L423)
