flix

0.81.0

Palette

The shared palette.

Every colour here is checked by test/TestContrast.flix against the background it is drawn on, using the WCAG 2.1 contrast ratio: at least 4.5 for text, at least 3.0 for shapes. Changing a colour without keeping those ratios fails the build, which is the point -- a sketch that looks fine on one display should stay legible on another.

Definitions

def azure(): Color§ Source

Azure blue accent color.

def background(): Color§ Source

The background every sketch clears to. Near-black, like an arcade cabinet.

def cannonGreen(): Color§ Source

Green for the player cannon.

def coral(): Color§ Source

Coral red accent color.

def dim(): Color§ Source

Secondary text and captions.

def ground(): Color§ Source

Green for ground line.

def ink(): Color§ Source

Primary text.

def invaderCyan(): Color§ Source

Cyan for middle invader row.

def invaderGreen(): Color§ Source

Bright green for top invader row.

def invaderMagenta(): Color§ Source

Magenta for bottom invader row.

def mint(): Color§ Source

Soft mint green accent color.

def shapeColors(): List[Color]§ Source

Colours used for shapes on background. Must reach a 3.0 contrast ratio.

def shot(): Color§ Source

White for player and invader shots.

def silhouette(): Color§ Source

Large blocks drawn against the background, such as the skyline.

def sun(): Color§ Source

Yellow accent for the sun and banners.

def textColors(): List[Color]§ Source

Colours used for text on background. Must reach a 4.5 contrast ratio.