object ColorRamp extends Serializable
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- ColorRamp
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
- def apply(colors: Int*)(implicit d: DummyImplicit): ColorRamp
- def apply(colors: Traversable[Int]): ColorRamp
- def apply(colors: Array[Int]): ColorRamp
-
def
chooseColors(c: Vector[Int], numColors: Int): Vector[Int]
RGBA interpolation logic
- implicit def colorRampToIntArray(colorRamp: ColorRamp): Array[Int]
- implicit def colorRampToIntVector(colorRamp: ColorRamp): Vector[Int]
- implicit def intArrayToColorRamp(colors: Array[Int]): ColorRamp
- implicit def intVectorToColorRamp(colors: Vector[Int]): ColorRamp
-
def
spread(colors: Vector[Int], n: Int): Vector[Int]
This method will return a smaller list of colors the provided list of colors, spaced out amongst the provided color list.
This method will return a smaller list of colors the provided list of colors, spaced out amongst the provided color list. Used internally for normalization
For example, if we are provided a list of 9 colors on a red to green gradient, but only need a list of 3, we expect to get back a list of 3 colors with the first being red, the second color being the 5th color (between red and green), and the last being green.
- colors
Provided RGBA color values
- n
Length of list to return