Use to validate and coerce to character-based hex-codes.
We coerce to CSS six-digit hex codes that use lower-case,
e.g. "#336699"
, "#aabbcc"
.
pth_new_hex(hex)
character
that can be coerced to a six-digit hex code.
character
, six-character hex code.
pth_new_hex("#11223344")
#> [1] "#112233"
#> attr(,"class")
#> [1] "pth_hex"
pth_new_hex("#AA1122")
#> [1] "#aa1122"
#> attr(,"class")
#> [1] "pth_hex"