Reference · Browser table and SVG
ownerColourfunction
The colour a territory's owner is drawn in.
Import it
import { ownerColour } from "@johnmorrisdotca/tenka/ui";
Definition
function ownerColour(owner: number, colours?: readonly string[]): string
Parameters
| Name | Type | Description |
|---|---|---|
owner | number | The seat index, or the neutral-owner marker. |
colours (optional) | readonly string[] | The seat colour palette. |
Returns
string
The colour a territory's owner is drawn in.
Examples
import { ownerColour } from "@johnmorrisdotca/tenka/ui";
console.log(ownerColour(0));#c8463dWhat it prints (run when this page was built)