本文へ移動

Taisen Brackets対戦

対戦の一覧から、トーナメント表をSVGで描きます。

対戦(たいせん)は、二者が向かい合って勝負することです。 名前について(英語)

目次

リファレンス · トーナメント表の背景

BackgroundInk型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The colours that read well over a background: text, lines, boxes, edges and its dominant colours.

インポート

import type { BackgroundInk } from "@johnmorrisdotca/taisen-brackets/backgrounds";

ほかのエクスポート元: @johnmorrisdotca/taisen-brackets

定義

type BackgroundInk = shared.BackgroundInk;

メンバー

名前型説明
basestring

The plain colour to fill the picture with before body: the ground's first colour.

darkboolean

Whether the ground is dark (so the text is light).

textstring
mutedstring
linestring

The connecting lines.

boxstring

The fill and edge of a box laid on the picture; both are rgba().

edgestring
panelstring

The pill behind a round's name, a team's plain disc, the ring round a mark, the dotted road and the accent for a winner, a champion and a highlight.

plainstring
ringstring
spinestring
accentstring
dominantstring[]

The colours the picture is mostly, worst cases included: the ground's two colours and each blended with the glow at its strongest.

例

import { backgroundSvg, type BackgroundInk } from "@johnmorrisdotca/taisen-brackets/backgrounds";

const ink: BackgroundInk = backgroundSvg("ice", { width: 400, height: 300, theme: "light" }).ink;
console.log(ink.dark, ink.text);
false #16181a

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/taisen-brackets 0.20.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。