Pictures created with Codea

@CrazyEd… Fantastic! Vielen Dank!

I propose that both of your conversion tools are added to the wiki so that others can find and use them.

I’ll bet you $100 that @Ipda41001 is about to do it. He just did it with all those other apps.

This is going to be hard. Feel free to race me to it. Im a really slow coder and I’m not around my iPad too much (because it’s my dad’s :frowning: )

I’m going from oldest to newest. Having a mental low kind of day. Decided to be productive doing something that would bore me to death any other day. I may not get up to the present era before boredom, sleep, and or a call back to the war occurs.

Ah. Cool. I think I will. Its just I’ve only been around my iPhone recently and that’s hard to edit Wiki on this. Ive done a few things though.

@Blanchot: I have found a small bug in my hsv2rgb code: for H=0 the color was wrong …
It now accepts H between 0° and 360°, and S and V between 0 and 1. So both routines should be consistent now.

please replace the function with this one:


function hsv2rgb(H, S, V)
    -- H is between 0° and 360°
    -- S, V allows values between [0 ... 1]
    local I, F, M, N, K
       
    H=H/60; I=math.floor(H - 0.000001)
    if I<0 then I=0; end
    F=H-I  
    M=V*(1-S); N=V*(1-S*F); K=V*(1-S*(1-F))
      
    if I==0 then
        R=V; G=K; B=M
    elseif I==1 then
        R=N; G=V; B=M
    elseif I==2 then
        R=M; G=V; B=K
    elseif I==3 then
        R=M; G=N; B=V
    elseif I==4 then
        R=K; G=M; B=V
    elseif I==5 then
        R=V; G=M; B=N
    end

    return math.floor(R*255), math.floor(G*255), math.floor(B*255)

end