colorR2B
Color scale from red to blue.
Syntax
f = colorR2B(n, k)
Description
f = colorR2B(n, k) returns the rgb vector in the following conditions:
if k = 1, f = [1, 0, 0], if k = n, f = [0, 0, 1] and if k is between 1
and n, then f will be an intermediate proportional rgb color.
Input
n = Number of iterations (Integer).
k = Current iteration (Integer).
Output
f = rgb vector (Double vector).
f = colorR2B(n, k) returns the rgb vector in the following conditions: if k = 1, f = [1, 0, 0], if k = n, f = [0, 0, 1] and if k is between 1 and n, then f will be an intermediate proportional rgb color.
Input
n = Number of iterations (Integer).
k = Current iteration (Integer).
Output
f = rgb vector (Double vector).
f = rgb vector (Double vector).