MrScottyTay [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=39449 Colour Reference 3.0 <p> <table><tr><td> <a href="/bbs/?pid=147325#p"> <img src="/bbs/thumbs/pico64_colours-10.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=147325#p"> Colour Reference 3.0</a><br><br> by <a href="/bbs/?uid=39449"> MrScottyTay</a> <br><br><br> <a href="/bbs/?pid=147325#p"> [Click to Play]</a> </td></tr></table> </p> <h2>Colour Reference</h2> <p>A simple and small colour reference utility intended to be ran as a widget, but can still be ran windowed.</p> <p>Think I'm mostly done with this app now as of v3.0. I have one more idea but I'll probably take a break before doing it and try and move onto something else in the meantime. I have what I want now to help with my development and learned a lot on the way too, hope this app can be useful to you too.</p> <h3>Widget install instructions</h3> <p>To add to your tooltray as a widget add the following line to the <code>/appdata/system/startup.lua</code></p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>create_process(&quot;/filepath/to/Colours.p64&quot;, { window_attribs = {workspace = &quot;tooltray&quot;, x=0, y=0}, })</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>change <code>&quot;/filepath/to/Colours.p64&quot;</code> to wherever you save the cart on your system.<br /> I would recommend saving it as <code>/appdata/tooltray/Colours.p64</code></p> <h3>Customisation</h3> <p>When ran as window the look of the app can be changed via the hamburger menu. To apply the same level of customisation when ran as a widget you can use the following arguments to do so:</p> <ul> <li> <p><strong>Chromatic</strong> - Change the ordering of the colours to<br /> be more reminiscent of the editors</p> </li> <li> <p><strong>UseDarkText</strong> - Instead of the default way to render<br /> the text colour on light coloured cells, it will<br /> use a single darker colour for all light coloured cells.</p> </li> <li> <p><strong>Vertical</strong> - Rotates the orientation to be vertical</p> </li> <li><strong>BigFont</strong> - use the standard Picotron font rather than<br /> the smaller Pico 8 font that this app uses by default.</li> </ul> <p>(For the following options, replace # with a number)</p> <ul> <li> <p><strong>XSize=#</strong> - Specify how wide you want the cells to be.<br /> Default value is 9, 2 pixels are added when in BigFont<br /> mode. 9 should be considered the smallest, otherwise<br /> the font won't align.</p> </li> <li><strong>PaddingSize=#</strong> - Specify the extra space in the middle<br /> 'trough' of the palette. Default is 2. When in vertical<br /> windowed mode, if the overall width of the palette is<br /> less than 32, the padding will be increased to<br /> accommodate. This limitation is ignored when used as a<br /> Widget.</li> </ul> <p>example of create_process command with args:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>create_process(&quot;/appdata/tooltray/Colours.p64&quot;, { window_attribs = {workspace = &quot;tooltray&quot;, x=0, y=0}, argv = {&quot;UseDarkText&quot;, &quot;Chromatic&quot; &quot;PaddingSize=4&quot;} })</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>The order of the args does not matter</p> <h3>Changelog:</h3> <p>v3.0</p> <ul> <li>Added Chromatic ordering that changes the orders of the colours to be more reminiscent of what you see in the editors. This can be changed in the windowed version in the hamburger menu with the <code>Change Ordering</code> option, and can be done for the widget with the <code>Chromatic</code> arg.</li> <li>removed un-needed files from the cart (Actually this time -.-)</li> </ul> <p>v2.3</p> <ul> <li>Implemented parsing of args for customising the look of the app when installed as a widget.</li> </ul> <p>v2.2</p> <ul> <li>Reimplemented the original default (larger) font version. Changeable via the <code>Change Font</code> option in the hamburger menu.</li> </ul> <p>v2.1</p> <ul> <li>Fixed an issue with the padding of the vertical mode persisting when reverting back to horizontal.</li> </ul> <p>v2.0</p> <ul> <li>Added Vertical mode - accessed in windowed mode via the <code>Change Orientation</code> option in the hamburger menu. I imagine this will be useful if using a Windowed editor like SLATE rather than the standard fullscreen one.</li> <li>Exposed option to change the way the colours over the light colours are done with the <code>Change Dark Text Style</code> in the hambruger menu (I will make this an arg at some point so it can also be done for when it's a Widget). </li> </ul> <p>v1.3</p> <ul> <li>fixed bug where window was still resizeable (thanks OniriCorpe) (somehow this fix wasn't saved to 1.2)</li> </ul> <p>v1.2</p> <ul> <li>cleaned up some code, removed previous now unused experiments etc.</li> <li>added comments to code in case people use the code as reference or learning</li> <li>added Widget instructions (same file you can see in cart image) into the cart itself</li> </ul> <p>v1.1</p> <ul> <li>Changed the font to the Pico 8 font to slim it down a bunch more.</li> </ul> https://www.lexaloffle.com/bbs/?tid=141956 https://www.lexaloffle.com/bbs/?tid=141956 Thu, 25 Apr 2024 20:33:27 UTC