Skip to contents

Colours are extracted from an image via URL and reversed, (e.g. red becomes cyan, green becomes magenta, yellow becomes blue) then stored in a table as HEX codes and RGB values.

Usage

negative(img_url, num_colours)

Arguments

img_url

URL of an image file

num_colours

number of colours to be extracted

Value

data.frame (tibble::tibble)

Examples

url <- "https://i.imgur.com/s9egWBB.jpg"
negative(url, 3)
#> # A tibble: 3 × 4
#>     red green  blue hex    
#>   <dbl> <dbl> <dbl> <chr>  
#> 1   148    96    74 #94604A
#> 2   155   130    99 #9B8263
#> 3   246   237   242 #F6EDF2