# SyntenyColorsMixin

Auto-generated from the @jbrowse/mobx-state-tree model in the source. See the [developer guide](https://jbrowse.org/jb2/docs/developer_guide/) for concepts. Built into JBrowse core. [View source](https://github.com/GMOD/jbrowse-components/blob/main/packages/synteny-core/src/SyntenyColorsMixin.ts).

The color settings every view drawing synteny tracks shares — the linear
synteny view, the dotplot and the circular view: `TrackColorsMixin`'s
`encoding` and palette, the `encoding.opacity` it fades by and the
`filter`, over the tracks
the view draws. A view supplies `syntenyTracks()`,
its opacity default and, optionally, the field it paints by until told
otherwise.

Each section ends with the members a composed model contributes, linked to the page that documents them.

## Properties

4 inherited properties from 3 models:

From [TrackColorsMixin](../trackcolorsmixin): [`encoding`](../trackcolorsmixin#property-encoding), [`trackColors`](../trackcolorsmixin#property-trackcolors)

From [ParkedColorMixin](../parkedcolormixin): [`parkedColors`](../parkedcolormixin#property-parkedcolors)

From [SyntenyFilterMixin](../syntenyfiltermixin): [`filter`](../syntenyfiltermixin#property-filter)


## Volatiles

1 inherited volatile from one model:

From [TrackColorsMixin](../trackcolorsmixin): [`seenAttributeRanges`](../trackcolorsmixin#volatile-seenattributeranges)


## Getters

| Member | Description |
| --- | --- |
| **defaultOpacity**<br><code>number</code> | The constant opacity a reset returns to: low on the synteny view for dense whole-genome hairballs, opaque on the dotplot. |
| **opacitySetting**<br><code>SyntenyOpacitySnapshot</code> | `encoding.opacity` as its snapshot holds it. |
| **opacityFade**<br><code>SyntenyOpacitySnapshot &#124; undefined</code> | What the color pass fades each alignment by: the field's mapping with its range as shares of `opacityLevel`, or undefined while `encoding.opacity` draws its constant, so the slider recolors nothing either way. |
| **opacityLevel**<br><code>number</code> | The opacity every alignment draws at before a field's fade: the shader's uniform (`opacityLevel`). |
| **opacityField**<br><code>string &#124; undefined</code> | The field `encoding.opacity` fades by, undefined while it draws its constant. |

19 inherited getters from 3 models:

From [TrackColorsMixin](../trackcolorsmixin): [`colorSetting`](../trackcolorsmixin#getter-colorsetting), [`impliedColorField`](../trackcolorsmixin#getter-impliedcolorfield), [`colorPaint`](../trackcolorsmixin#getter-colorpaint), [`colorValue`](../trackcolorsmixin#getter-colorvalue), [`colorDomain`](../trackcolorsmixin#getter-colordomain), [`colorRange`](../trackcolorsmixin#getter-colorrange), [`colorableAttributes`](../trackcolorsmixin#getter-colorableattributes), [`attributeRanges`](../trackcolorsmixin#getter-attributeranges), [`colorableTracks`](../trackcolorsmixin#getter-colorabletracks), [`trackColorAssignments`](../trackcolorsmixin#getter-trackcolorassignments), [`colorField`](../trackcolorsmixin#getter-colorfield), [`hideUnlabelled`](../trackcolorsmixin#getter-hideunlabelled), [`hasLegendKey`](../trackcolorsmixin#getter-haslegendkey), [`colorLegendChips`](../trackcolorsmixin#getter-colorlegendchips), [`colorScales`](../trackcolorsmixin#getter-colorscales)

From [ParkedColorMixin](../parkedcolormixin): [`parkedColor`](../parkedcolormixin#getter-parkedcolor), [`parkedIdentity`](../parkedcolormixin#getter-parkedidentity)

From [SyntenyFilterMixin](../syntenyfiltermixin): [`predicates`](../syntenyfiltermixin#getter-predicates), [`minLength`](../syntenyfiltermixin#getter-minlength)


## Methods

| Member | Description |
| --- | --- |
| **syntenyTracks**<br><code>() =&gt; ComparativeTrackModel[]</code> | Overridable hook: every synteny track in the view, in paint order. |
| **colorableTrackConfigs**<br><code>() =&gt; { trackId: string; name: string; }[]</code> |  |
| **colorableAttributeNames**<br><code>() =&gt; string[]</code> | The columns the tracks declare in their adapter's `attributeColumns` (the ortholog-table adapter's slot), one color mode each. |
| **legendAlpha**<br><code>() =&gt; number</code> | The plot's opacity composites the key's chips, as it does the alignments. |

7 inherited methods from 3 models:

From [TrackColorsMixin](../trackcolorsmixin): [`loadedAttributeRanges`](../trackcolorsmixin#method-loadedattributeranges), [`legendCigarOps`](../trackcolorsmixin#method-legendcigarops), [`colorSurface`](../trackcolorsmixin#method-colorsurface), [`offersReferenceColor`](../trackcolorsmixin#method-offersreferencecolor), [`trackColorFor`](../trackcolorsmixin#method-trackcolorfor)

From [ParkedColorMixin](../parkedcolormixin): [`parkedColorOf`](../parkedcolormixin#method-parkedcolorof)

From [SyntenyFilterMixin](../syntenyfiltermixin): [`lowerBound`](../syntenyfiltermixin#method-lowerbound)


## Actions

| Member | Description |
| --- | --- |
| **setOpacity**<br><code>(value: number) =&gt; void</code> | The opacity slider: the constant, or under a field its range scaled so its most opaque end equals `value`. |
| **setOpacityField**<br><code>(field: string &#124; undefined) =&gt; void</code> | Fade by `field` from the current opacity down to 0.3 of it, or with undefined draw every alignment at the opacity the fade reached. |

12 inherited actions from 3 models:

From [TrackColorsMixin](../trackcolorsmixin): [`observeAttributeRanges`](../trackcolorsmixin#action-observeattributeranges), [`resetAttributeRanges`](../trackcolorsmixin#action-resetattributeranges), [`setHideUnlabelled`](../trackcolorsmixin#action-sethideunlabelled), [`setColorField`](../trackcolorsmixin#action-setcolorfield), [`setColorValue`](../trackcolorsmixin#action-setcolorvalue), [`openSolidColorDialog`](../trackcolorsmixin#action-opensolidcolordialog), [`setColorDomain`](../trackcolorsmixin#action-setcolordomain), [`setTrackColor`](../trackcolorsmixin#action-settrackcolor), [`clearTrackColors`](../trackcolorsmixin#action-cleartrackcolors)

From [ParkedColorMixin](../parkedcolormixin): [`parkColor`](../parkedcolormixin#action-parkcolor)

From [SyntenyFilterMixin](../syntenyfiltermixin): [`setFilter`](../syntenyfiltermixin#action-setfilter), [`setLowerBound`](../syntenyfiltermixin#action-setlowerbound)


