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

luminancefunction

How light a colour is, from 0 (black) to 1 (white), as the WCAG contrast rules measure it.

Import it

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

Definition

function luminance(c: Parameters<typeof shared.luminance>[0]): number

Parameters

NameTypeDescription
cRgb

The red, green and blue, 0 to 255.

Returns

number

The relative luminance.

Examples

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

console.log(luminance([255, 255, 255]), luminance([0, 0, 0]));
1 0

What it prints (run when this page was built)

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