Hello.
I finally post the new screenshoot and the new main code after applying many of the suggestions form Rich. Thank you very much!
// Input sliders demo
// Germán Fabregat - 2015
#include "slider.agc"
// Tamaño pantalla
#constant pantX 480
#constant pantY 800
SetVirtualResolution(pantX, pantY)
img = LoadImage("fondo.png")
backSpr = CreateSprite (img)
SetSpriteSize (backSpr, pantX, pantY)
// Create sliders
sr = CreateSlider(80, 60, "R", 0, 255)
sg = CreateSlider(80, 140, "G", 0, 255)
sb = CreateSlider(80, 220, "B", 0, 255)
sa = CreateSlider(80, 300, "A", 0, 255)
// Create sprites
sprR = CreateSprite(0)
SetSpriteSize(sprR, 130, 100)
SetSpriteColor(sprR, 0, 0, 0, 255)
SetSpritePosition(sprR, 35, 450)
sprG = CreateSprite(0)
SetSpriteSize(sprG, 130, 100)
SetSpriteColor(sprG, 0, 0, 0, 255)
SetSpritePosition(sprG, 175, 450)
sprB = CreateSprite(0)
SetSpriteSize(sprB, 130, 100)
SetSpriteColor(sprB, 0, 0, 0, 255)
SetSpritePosition(sprB, 315, 450)
sprT1 = CreateSprite(0)
SetSpriteSize(sprT1, 205, 100)
SetSpriteColor(sprT1, 0, 0, 0, 0)
SetSpritePosition(sprT1, 35, 560)
sprT2 = CreateSprite(0)
SetSpriteSize(sprT2, 205, 100)
SetSpriteColor(sprT2, 0, 0, 0, 255)
SetSpritePosition(sprT2, 240, 560)
SetSpriteDepth(sprT2, 5)
// Checkered flag
img = LoadImage("chk.png")
sprChk = CreateSprite(img)
SetSpriteSize(sprChk, 205, 100)
SetSpritePosition(sprChk, 240, 560)
// Color Hex text
t = CreateText("00000000")
SetTextSize(t, 40)
SetTextPosition(t, 140, 680)
SetTextColor(t, 0, 0, 0, 255)
do
UpdateSlider(sr)
UpdateSlider(sg)
UpdateSlider(sb)
UpdateSlider(sa)
r = GetSliderVal(sr)
g = GetSliderVal(sg)
b = GetSliderVal(sb)
a = GetSliderVal(sa)
SetSliderTextColor(sr, r, 0, 0, 255)
SetSliderTextColor(sg, 0, g, 0, 255)
SetSliderTextColor(sb, 0, 0, b, 255)
SetSliderTextColor(sa, r, g, b, a)
text$ = ItoHex(a, 2) + ItoHex(r, 2) + ItoHex(g, 2) + ItoHex(b, 2)
SetTextString(t, text$)
SetSpriteColor(sprR, r, 0, 0, 255)
SetSpriteColor(sprG, 0, g, 0, 255)
SetSpriteColor(sprB, 0, 0, b, 255)
SetSpriteColor(sprT1, r, g, b, 255)
SetSpriteColor(sprT2, r, g, b, a)
Sync()
loop
// Returns a string of at least pos characters
// with the hex value of v
function ItoHex(v, pos)
ret$ as string
l as integer
ret$ = Hex(v)
l = Len(ret$)
while l < pos
ret$ = "0" + ret$
l = l + 1
endwhile
endfunction ret$