rangeRgb: Calculate the range for each component of an RGB colour

Description Usage Arguments Value Examples

View source: R/cultural-analytics.r

Description

This function calculates the ranges for the components of an RGB colorspace library objects and returns them as named values in a list.

Usage

1
rangeRgb(rgbs)

Arguments

rgbs

colorspace library RGB values.

Value

A list with the range for the R, G and B values under those names.

Examples

1
2
3
4
5
6
library(jpeg)
imgdir<-paste(system.file(package = "CulturalAnalytics"), "images", sep = "/")
imgs<-paste(imgdir, dir(path = imgdir, pattern = ".jpg"), sep = "/")
img<-readJPEG(imgs[1])
rgbs<-imageToRgb(img)
rgbrange<-rangeRgb(rgbs)

CulturalAnalytics documentation built on May 31, 2017, 3:28 a.m.