Skip to the content

Korokoroコロコロ

Roll mixed dice or type notation, compare exact probabilities, keep a history and replay seeded rolls.

Korokoro describes something small rolling in Japanese. About the name

Contents

Reference · Rolls and exact odds

clothVarsfunction

A cloth as the tray's CSS variables; nothing for a name that is not a cloth, so the tray keeps its own.

Import it

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

Definition

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

Parameters

NameTypeDescription
clothstring | null | undefined

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

Returns

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

A cloth as the tray's CSS variables; nothing for a name that is not a cloth, so the tray keeps its own.

Examples

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

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/korokoro 1.16.0.