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

create_texture

Create Texture


Description

Creates a texture map based on 5 user-supplied colors.

Usage

create_texture(
  lightcolor,
  shadowcolor,
  leftcolor,
  rightcolor,
  centercolor,
  cornercolors = NULL
)

Arguments

lightcolor

The main highlight color. Corresponds to the top center of the texture map.

shadowcolor

The main shadow color. Corresponds to the bottom center of the texture map. This color represents slopes directed directly opposite to the main highlight color.

leftcolor

The left fill color. Corresponds to the left center of the texture map. This color represents slopes directed 90 degrees to the left of the main highlight color.

rightcolor

The right fill color. Corresponds to the right center of the texture map. This color represents slopes directed 90 degrees to the right of the main highlight color.

centercolor

The center color. Corresponds to the center of the texture map. This color represents flat areas.

cornercolors

Default ‘NULL'. The colors at the corners, in this order: NW, NE, SW, SE. If this vector isn’t present (or all corners are specified), the mid-points will just be interpolated from the main colors.

Examples

#Here is the `imhof1` palette:
create_texture("#fff673","#55967a","#8fb28a","#55967a","#cfe0a9") %>%
 plot_map()

#Here is the `unicorn` palette:
create_texture("red","green","blue","yellow","white") %>%
 plot_map()

rayshader

Create Maps and Visualize Data in 2D and 3D

v0.24.10
GPL-3
Authors
Tyler Morgan-Wall
Initial release
2021-04-25

We don't support your browser anymore

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