RGB Gradients Generation
JavaScript (ES6), 130 bytes
g=
(f,t,n)=>[...Array(++n+1)].map((_,i)=>f.replace(/../g,(e,j)=>((`0x${e}`*(n-i)+`0x${t[j]+t[j+1]}`*i)/n|256).toString(16).slice(1)))
;
p=_=>g(f.value,t.value,+n.value).map(e=>o.insertRow().insertCell().appendChild(document.createTextNode(e)).parentNode.bgColor=e);
<input id=f value=e14f09><input id=t value=9a04f6><input id=n value=4 type=number><input type=button onclick=p() value=Go!><table id=o bgcolor=black cellpadding=4>
Dyalog APL, 44 bytes
Prompts for N, then Beginning-color, then Ending-color. Needs ⎕IO←0
which is default on many systems.
h[↑⌊B∘+¨(⍳2+N)×(-/E B←(h←⎕D,⎕A)∘⍳¨⍞⍞)÷1+N←⎕]
h[
...]
index into h (which has a value when we finish evaluating the the bracket's content)
N←⎕
prompt for numeric N (4)
1+
add one to N (5)
(
...)÷
use that to divide the result of...
⍞⍞
prompt for two character strings ["7E0E7E","FF3762"]
(
...)∘⍳¨
find the indices of the each string's characters in...
⎕D,⎕A
Digits followed by Alphabet
h←
assigned to h
now we have "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
E B←
assign the indices to E and B [[7,14,0,14,7,14],[15,15,3,7,6,2]]
-/
subtract and enclose B from E [[-8,-1,-3,7,1,12]]
the result so far is [[-1.6,-0.2,-0.6,1.4,0.2,2.4]]
(
...)×
multiply this by...
2+N
two plus N (6)
⍳
first integers [0,1,2,3,4,5]
this gives us [[0,0,0,0,0,0],[-1.6,-0.2,-0.6,1.4,0.2,2.4],[-3.2,-0.4,-1.2,2.8,0.4,4.8],...]
B∘+¨
add B to each [[15,15,3,7,6,2],[13.4,14.8,2.4,8.4,6.2,4.4],[11.8,14.6,1.8,9.8,6.4,6.8],...]
⌊
round down [[15,15,3,7,6,2],[13,14,2,8,6,4],[11,14,1,9,6,6],...]
↑
make list of lists into table
[[15,15, 3, 7, 6, 2]
[13,14, 2, 8, 6, 4]
[11,14, 1, 9, 6, 6]
[10,14, 1,11, 6, 9]
[ 8,14, 0,12, 6,11]
[ 7,14, 0,14, 7,14]]
here we index into h, giving
[["F","F","3","7","6","2]
["D","E","2","8","6","4]
["B","E","1","9","6","6]
["A","E","1","B","6","9]
["8","E","0","C","6","B]
["7","E","0","E","7","E]]
which is the same as
[["FF3762"]
["DE2864"]
["BE1966"]
["AE1B69"]
["8E0C6B"]
["7E0E7E"]]
and prints as
FF3762
DE2864
BE1966
AE1B69
8E0C6B
7E0E7E
TryAPL online!
Pyth - 35 bytes
Horribly golfed, just gave up.
j++hQsMCm.HMsM:F+dc-FdvzCmiR16cd2Qe
Try it online here.
Example: