Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

writehex

Write Hexadecimal Color Descriptions


Description

Given a color object, this function writes a file containing the hexadecimal representation of the colors in the object.

Usage

writehex(x, file = "")

Arguments

x

a color object.

file

the name of the file to be written.

Details

This function converts the given color object to RGB and then writes hexadecimal strings (of the form #RRGGBB) representing the colors to the specified file.

Value

The name of the file is returned as the value of the function.

Author(s)

Ross Ihaka

See Also

Examples

set.seed(1)
x <- RGB(runif(10), runif(10), runif(10))
## IGNORE_RDIFF_BEGIN
writehex(x, file.path(tempdir(), "random.txt"))
## IGNORE_RDIFF_END

colorspace

A Toolbox for Manipulating and Assessing Colors and Palettes

v2.0-1
BSD_3_clause + file LICENSE
Authors
Ross Ihaka [aut], Paul Murrell [aut] (<https://orcid.org/0000-0002-3224-8858>), Kurt Hornik [aut] (<https://orcid.org/0000-0003-4198-9911>), Jason C. Fisher [aut] (<https://orcid.org/0000-0001-9032-8912>), Reto Stauffer [aut] (<https://orcid.org/0000-0002-3798-5507>), Claus O. Wilke [aut] (<https://orcid.org/0000-0002-7470-9261>), Claire D. McWhite [aut] (<https://orcid.org/0000-0001-7346-3047>), Achim Zeileis [aut, cre] (<https://orcid.org/0000-0003-0918-3766>)
Initial release
2021-05-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.