Description Usage Arguments Details Value Examples
Test whether a string is a valid hexadecimal color value
1 |
hex |
character vector containing string(s) to test as hex value(s). |
hash |
boolean, default TRUE; indicates whether |
A hex code is valid if:
It begins with '#' (can set hash = FALSE
if needed, see below), and
It is three, six, or eight characters long, consisting of the characters 0-9, A-F, and/or a-f.
Three-character hex codes are interpolated to six-character codes by repeating each element twice. Eight- character hex codes contain two digits (either prepended or appended) representing transparency (alpha).
vector of boolean values indicating whether string(s) are valid hex code.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.