How to use the culori.interpolate function in culori

To help you get started, we’ve selected a few culori examples, based on popular ways it is used in public projects.

github Evercoder / uiuiui / src / ColorVariations / ColorVariations.js View on Github external
render() {
		let { color, scale, count, mode, className, tabIndex, trim } = this.props;

		let variations = samples(count)
			.map(interpolate(scale(color), mode))
			.map(hex);

		if (trim) {
			variations = variations.slice(1, variations.length - 1);
		}

		return (
			<SwatchList
				className={`
					uix-colorvariations
					${className || ''}
				`}
				tabIndex={tabIndex}
				onSelect={this.props.onSelect}
				property={this.props.property}
			>

culori

A general-purpose color library for JavaScript

MIT
Latest version published 10 months ago

Package Health Score

67 / 100
Full package analysis