Learn R Programming

FastUtils (version 0.2.1)

scaleHex: Scale the Brightness of a Hex Color

Description

This function scales the brightness of hex colors by a given factor.

Usage

scaleHex(hex, scaleFactor)

Value

A hex color value with adjusted brightness.

Arguments

hex

Hex color values as characters.

scaleFactor

A numeric value to scale the brightness. A value of 1 returns the original color.

Examples

Run this code
scaleHex("#404040", 2)

Run the code above in your browser using DataLab