Reference
Backgrounds for a bracket
import { … } from "@johnmorrisdotca/taisen-brackets/backgrounds";
Exports
| Name | Kind | What it is |
|---|---|---|
BACKGROUND_PRESETS | constant | The names of the twenty-five poster backgrounds. |
BackgroundInk | type | The colours that read well over a background: text, lines, boxes, edges and its dominant colours. |
BackgroundPresetName | type | The name of one of the poster backgrounds. |
backgroundSvg | function | Draws one of the poster backgrounds. |
BackgroundSvg | type | A drawn background: the defs and the body to put in an SVG, and the ink that reads over it. |
BackgroundSvgOptions | type | What a background is drawn for: its width and height, the theme, colours, angle, intensity and seed. |
contrastRatio | function | The contrast between two colours, from 1 (the same) to 21 (black on white). |
FAMILY_BACKGROUNDS_VERSION | constant | The version of the backgrounds the family shares; a change to any picture changes it. |
luminance | function | How light a colour is, from 0 (black) to 1 (white), as the WCAG contrast rules measure it. |
parseColor | function | Reads a colour written as #rgb, #rrggbb or rgb(…). |
toHex | function | Writes a colour as #rrggbb. |