Learn R Programming

pixiedust (version 0.9.4)

is_valid_color: Test a Character String For Pixiedust Recognized Color Format

Description

pixiedust recognizes colors as dvips names, rgb(R,G,B), rgba(R,G,B,A), #RRGGBB, or #RRGGBBAA. This code returns a logical indicating if the given character strings are valid.

Usage

is_valid_color(color)

is_valid_color_single(color)

Arguments

color

A character vector of color names.

Functional Requirements

  1. Returns a logical vector correctly identifying valid color formats.

  2. Casts an error if color is not a character object.