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:
- 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
- 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}})
- restart Picotron and enjoy your new widget!
Curious about the Pomodoro timer? You can find that here.
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
I did everything you described and it doesn't show in my tooltray when I drag down.
@arrowonionbelly, did you change the path to your colors.lua file in startup.lua? Copying and pasting isn't enough 💜
Thank you! I've made mine a bit more compact and only wrapping 2 lines.
If you'd also like to do this
- in colors.lua change the GRID_SIZE to 12
- local x and y to break after 16 instead of 8 [local x = ((i-1)%16)*GRID_SIZE]
- padding from 3 down to 1 [print(palette[i],x+1,y+1,7)]
- in startup.lua change width to 192 and height to 24
[Please log in to post a comment]