interpolateColor

fun interpolateColor(color1: Int, color2: Int, ratio: Float): Int

Helper function for creation of color map. Interpolates between two given colors using their HSV values.

Return

Color associated with x2

Parameters

color1

First color

color2

Second color

ratio

Between 0 to 1. Fraction of the distance between color1 and color2