Skip to contents

The red, green and blue of a colour, from 0 to 1, without the gamma of sRGB: in proportion to the light that each gives, which contrast_ratio() and visible_color() need.

Usage

linear_rgb(hex)

Arguments

hex

A colour, as "#RRGGBB".

Value

Three numbers from 0 to 1.

Examples

rghcard:::linear_rgb("#198CE7")
#> [1] 0.009721217 0.262250658 0.799102738