Skip to the content

Hitotsu一つ

Match the colour or number, call with one card left, and play classic or party rules against computers or at a shared table.

Hitotsu is Japanese for one: the call with one card left. About the name

Contents

Reference · Game engine and table

clothVarsfunction

A cloth as CSS variables; nothing for a name that is not a cloth, so the defaults stay.

Import it

import { clothVars } from "@johnmorrisdotca/hitotsu";

Definition

function clothVars(cloth: string | undefined | null): Record<`--ht-${string}`, string>

Parameters

NameTypeDescription
clothstring | null | undefined

A built-in cloth name; an unknown name leaves the defaults.

Returns

Record<`--ht-${string}`, string>

The CSS variables to set on the element, or an empty object.

Examples

import { clothVars } from "@johnmorrisdotca/hitotsu";
console.log(clothVars("green"));
{
  '--ht-felt': '#2f5d4a',
  '--ht-felt-deep': '#1f4135',
  '--ht-felt-ink': '#f3efe4'
}

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hitotsu 1.6.1.