Código fuente de 'Gradiente de color en texto.asp'
<html>
<head>
<title>Gradiente de color en texto - Códigos asp, programacion asp, descargas asp, rutinas asp</title>
</head>
<p align="center"><b><font size="3">Gradiente de color en texto</font></b>
<body style="font-family: Arial; font-size: 9pt"></p>
<br>
<!--
' By: Tim Fischer
' Returns:String with font tags for Fading.
' http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=6308&lngWId=4
-->
<% function fadeText(strToFade, R1, G1, B1, R2,G2, B2)
Dim htmlTxtxt, X
if strToFade = "" Then Exit function
R2 = ((R2 - R1) / Len(strToFade))
G2 = ((G2 - G1) / Len(strToFade))
B2 = ((B2 - B1) / Len(strToFade))
For X = 0 To Len(strToFade) - 1
R = Abs(Int(R1 + (R2 * X)))
G = Abs(Int(G1 + (G2 * X)))
B = Abs(Int(B1 + (B2 * X)))
htmlTxt = htmlTxt & "<FONT color="
htmlTxt = htmlTxt & Chr(34) & "#"
if R < 17 Then htmlTxt = htmlTxt & "0"
htmlTxt = htmlTxt & Hex(R)
if G < 17 Then htmlTxt = htmlTxt & "0"
htmlTxt = htmlTxt & Hex(G)
if B < 17 Then htmlTxt = htmlTxt & "0"
htmlTxt = htmlTxt & Hex(B)
htmlTxt = htmlTxt & Chr(34)
htmlTxt = htmlTxt & ">"
htmlTxt = htmlTxt & Mid(strToFade, X + 1, 1)
htmlTxt = htmlTxt & "</FONT>"
Next
fadeText = htmlTxt
End function
%>
<%= fadeText("Este es un ejemplo de gradiente de colores en un texto", 240,44,0,0,200,50) %>
<br>
<% strFading = "Además se pueden colorear variables también--> "%>
<%= fadeText(strFading, 240,44,0,0,200,50) %>
<%= fadeText("1 2 3", 240,44,0,0,200,50)%>
</body></html>