The ColorPicker UI

It just looks like the real one in Codea…
But it has a problem.If you slide out of the square of color, the circle will not follow your finger.( it is really hard to describe, you can try it by yourself)
function setup()
local successFunc=function(data)
saveProjectTab(“ColorPicker”,data)
print(“Compelet to download the code.”)
end
http.request(“https://raw.githubusercontent.com/Thecivilizations/Index-UI/master/ColorPicker”,successFunc)
end

You can use the code above to install. And the class need two image assets. I will upload them soon.

Here is the asserts.

Wow, great work mimicking the Codea colour picker!

Now I complete the work. Just need to run the code again! I will add hiding function the next version.

I have added a slider. It can change the Alpha.
– Install
function setup()
local successFunc=function(data)
saveProjectTab(“ColorPicker”,data)
print(“Compelet to download the code.”)
end
local successFunc2=function(data)
saveProjectTab(“EasySlider”,data)
end
http.request(“https://raw.githubusercontent.com/Thecivilizations/Index-UI/master/ColorPicker”,successFunc)
http.request(“https://raw.githubusercontent.com/Thecivilizations/Index-UI/master/EasySlider”,successFunc2)
end

Run the code above this time.

How to get the color picker to pop up?

@DayLightTimer

@EvanDavis I don’t think there is any possibility…

How do I use this?
my current attempt at testing shows the alpha slider and if I turn off the background in my draw I get a flickering red square also… I assume Im missing something.

function setup()
    col=ColorChooseBox(WIDTH/2, HEIGHT/2)
end
function draw()
    background(176, 127, 127, 255)
    col:draw()
end
function touched(touch)
    col:touched(touch)
end
  

Ok I found the needed images, had missed that in the first message. Currently though seems like im missing the little white circle still

I think it might be better to use a shader for the color circle to generate it, should be really easy will send a revision in moment

@AxiomCrux to encompass code in the blue box, put ~~~ before and after the code chunk

[CODE]
function setup()
col=ColorChooseBox(WIDTH/2, HEIGHT/2)
end
function draw()
background(176, 127, 127, 255)
col:draw()
end
function touched(touch)
col:touched(touch)
end

still missing the little white circle image.

http://glslsandbox.com/e#30493