toColorBuffer
fun toColorBuffer(drawer: Drawer, width: Int = 256, height: Int = 16, type: ColorType = ColorType.UINT8_SRGB, format: ColorFormat = ColorFormat.RGBa): ColorBuffer(source)
Converts a color sequence into a color buffer with a gradient representation.
Return
A ColorBuffer containing the rendered color gradient.
Parameters
drawer
The Drawer used to render the gradient into the color buffer.
width
The width of the resulting color buffer in pixels. Defaults to 256.
height
The height of the resulting color buffer in pixels. Defaults to 16.
type
The ColorType of the resulting color buffer. Defaults to UINT8_SRGB.
format
The ColorFormat of the resulting color buffer. Defaults to RGBa.