dot-is_light_colour: Determine if a Colour is Light

.is_light_colourR Documentation

Determine if a Colour is Light

Description

Internal helper function to determine whether a colour is light or dark for appropriate font colour selection (black text on light backgrounds, white text on dark backgrounds).

Usage

.is_light_colour(colour)

Arguments

colour

A colour specification (hex code, named colour, etc.)

Details

Uses standard luminance calculation: 0.299R + 0.587G + 0.114*B, normalized to 0-1 scale. Coefficients reflect human eye sensitivity to different colours (green > red > blue).

Value

Logical. TRUE if the colour is light (luminance > 0.5), FALSE if dark.


biometryassist documentation built on June 11, 2025, 5:08 p.m.