darker: darker

View source: R/color.R

darkerR Documentation

darker

Description

Given a color, return a darker one

Usage

darker(col, amount=150)

Arguments

col

(color) The original color. Might be specified as a color name or a "#RRGGBB(AA)" hex color definition.

amount

(integer, [0-255]) The fixed amount to subtract to each RGB channel (Defaults to 150).

Details

Very simple utility function to create darker colors. Given a color, it transforms it to rgb space, adds a set amount to all chanels and transforms it back to a color.

Value

A darker color

See Also

lighter

Examples

 
darker("red")
darker("#333333")
darker(c("red", 3, "#FF00FF"))
 

bernatgel/karyoploteR documentation built on Feb. 1, 2024, 11:48 p.m.