Reference · Game engine and table
colourWordsfunction
A colour’s name in English or Japanese.
Import it
import { colourWords } from "@johnmorrisdotca/hitotsu";
Definition
function colourWords(colour: HitotsuColour, language?: "en" | "ja"): string
Parameters
| Name | Type | Description |
|---|---|---|
colour | HitotsuColour | The colour to name. |
language (optional) | "en" | "ja" | English or Japanese for the displayed words. |
Returns
string
A colour’s name in English or Japanese.
Examples
import { colourWords } from "@johnmorrisdotca/hitotsu";
console.log(colourWords("R", "ja"));赤What it prints (run when this page was built)