Skip to the content

Taisen Brackets対戦

Knockout brackets as SVG, from a list of ties.

Taisen (対戦, たいせん) is Japanese for a matchup: two sides facing each other. About the name

Contents

Reference

Backgrounds for a bracket

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

Exports

NameKindWhat it is
BACKGROUND_PRESETSconstantThe names of the twenty-five poster backgrounds.
BackgroundInktypeThe colours that read well over a background: text, lines, boxes, edges and its dominant colours.
BackgroundPresetNametypeThe name of one of the poster backgrounds.
backgroundSvgfunctionDraws one of the poster backgrounds.
BackgroundSvgtypeA drawn background: the defs and the body to put in an SVG, and the ink that reads over it.
BackgroundSvgOptionstypeWhat a background is drawn for: its width and height, the theme, colours, angle, intensity and seed.
contrastRatiofunctionThe contrast between two colours, from 1 (the same) to 21 (black on white).
FAMILY_BACKGROUNDS_VERSIONconstantThe version of the backgrounds the family shares; a change to any picture changes it.
luminancefunctionHow light a colour is, from 0 (black) to 1 (white), as the WCAG contrast rules measure it.
parseColorfunctionReads a colour written as #rgb, #rrggbb or rgb(…).
toHexfunctionWrites a colour as #rrggbb.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/taisen-brackets 0.20.0.