# FeatureEncoding

Auto-generated from the config schema in the source — see the [config guide](https://jbrowse.org/jb2/docs/config_guide) for concepts. Built into JBrowse core. [View source](https://github.com/GMOD/jbrowse-components/blob/main/packages/display-kit/src/featureEncodingConfigSchema.ts).

The canvas feature displays' `encoding`, the channels the features paint
through.

## Example usage

```js
{ type: 'LinearBasicDisplay', encoding: { color: 'gene_biotype' } }
```

## Config slots

A setting written to it names members one by one: a member left out stays as it is, and `null` resets one. Slot types (`fileLocation`, `frozen`, ...) are explained in the [config slot types reference](https://jbrowse.org/jb2/docs/config_guides/slot_types). Slots a base configuration contributes are listed here too, so this table is the whole surface.

| Slot | Description |
| --- | --- |
| **color**<br>[FeatureColor](../featurecolor) | The main fill of each feature: `{ value }`, a CSS color or a jexl expression, or a field and the `scale` its values map through, with a key. |

