Log In  

The Picotron palette was quite chaotic and the numbering wasn't very intuitive to me (probably due to being backwards compatible with PICO-8). I thought it might be nice to have an easy reference within reach so I don't need to open a forum post or wiki page whenever I need to work with colors. If you'd like to add this widget yourself, here are the steps:

  1. create a file named "colors.lua" and place it somewhere that makes sense to you (mine is in /appdata/local/tooltray/colors.lua)
    -- colors.lua
    local GRID_SIZE=20
    local palette={0,20,4,31,15,8,24,2,21,5,22,6,7,23,14,30,1,16,17,12,28,29,13,18,19,3,27,11,26,10,9,25}
    function _draw()
        cls(0)
        for i=1,32 do
            local x = ((i-1)%8)*GRID_SIZE
            local y = ((i-1)//8)*GRID_SIZE
            rectfill(x,y,x+GRID_SIZE,y+GRID_SIZE,palette[i])
            print(palette[i],x+3,y+3,7)
            if palette[i] == 7 then print(palette[i],x+3,y+3,0) end
        end
    end
  2. create or open "/appdata/system/startup.lua" and add this line: (be sure to edit the path parameter)
    -- /appdata/system/startup.lua
    -- edit the x and y to place the widget wherever you want; width and height should stay the same as below
    create_process("/path/to/your/colors.lua", {window_attribs = {workspace = "tooltray", x=2, y=36, width=160, height=80}})
  3. restart Picotron and enjoy your new widget!

Curious about the Pomodoro timer? You can find that here.

P#144113 2024-03-22 08:12

1

Very nice! This will be a great help! For me, I think I'll rework the table to have a single row across the top

P#144132 2024-03-22 12:13

[Please log in to post a comment]