gradientAtPos(int r1, int g1, int b1, int r2, int g2, int b2, double pos) : String
gradientAtPosRGBA(BBRGBA RGBA1, BBRGBA RGBA2, double pos) : BBRGBA
gradientAtPos(int r1, int g1, int b1, int r2, int g2, int b2, double pos) : String
Calculates the color at a given position in a gradient. r1, b1, and g1 refer to the RGB components of the first start color and r2, b2, and g2 refer to the RGB components of the end color.
The parameter pos indicates the position in the gradient. It is a number between 0.0 and 1.0 with 0.0 returning the color (r1, g1, b1) and 1.0 returning the color (r2, g2, b2).
The function returns the color in the format "rgba(r, g, b, 1.0)" so that it can be used with a CanvasRenderingContext2D's fillStyle property.
gradientAtPosRGBA(BBRGBA RGBA1, BBRGBA RGBA2, double pos) : BBRGBA
Calculates the color at a given position in a gradient. RGBA1 refers to the start color and RGBA2 refers to the end color.
The parameter pos indicates the position in the gradient. It is a number between 0.0 and 1.0 with 0.0 returning the color RGBA1 and 1.0 returning the color RGBA2.
The function returns a BBRGBA object.