Skip to content

Function: tint() ​

ts
function tint(hex, weight): string;

Mixes a hex color with white by weight (0–1) to produce a tint.

Parameters ​

ParameterType
hexstring
weightnumber

Returns ​

string

Example ​

ts
tint('#336699', 0.5) // => '#99b2cc'

Since ​

1.0.0

Released under the MIT License.