-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
colors = [ [255, 0, 0], [255, 127, 0],
[255, 255, 0], [0, 255, 0], [0, 0, 255],
[75, 0, 255], [143,0, 255] ].each_with_position do |step, position|
next = colors[position+1]
red = step[0]
red_next = next[0]
green = step[1]
green_next = next[1]
blue = step[2]
blue_next = next[2]
rdelta = red_next - red
gdelta = green_next - green
bdelta = blue_next - blue
(num_of_tests / 6).each do |single_test|
r = red + rdelta
g = green + gdelta
b = blue + bdelta
# rgb are your colors for this test
end
endThis creates a single rainbow of colors over all your tests instead of repeating the rainbow.
Metadata
Metadata
Assignees
Labels
No labels