Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  OneBit_OLED
« previous next »
  • Print
Pages: [1]

Author Topic: OneBit_OLED  (Read 468 times)

Offline gnomacor

  • Member
  • *
  • Posts: 30
OneBit_OLED
« on: June 16, 2025, 03:33:38 PM »
Oh no, yet another modified OneBit theme? Hear me out, I swear it's not yet another recolouring.

This was in my back burner ever since the original OneBit came out. I was also looking to replicate the 80s/90s audio gear look on Rockbox, down to it being VFD. I appreciate the effort to make it look interesting, but IMHO this theme doesn't really nail the look. But that's not the point here.

What I did notice however is the SBS/menu theme. It had such a clean and organised look, with popping colours to accentuate some elements. I actually felt something. It strongly reminded me of 2000s/2010s MP3 interfaces, hence OLED. I swear I have seen something similar in an actual product but I can't seem to be able to identify them.

So this theme brings the visual of the SBS to the WPS, which is quite interesting if I might say. I wanted it to look as "stock" as possible, as if it could have been in a real product. The result is a text-centric theme with emphasis on colouring. Player informations are all converted into icons. Shuffle and Repeat indicators share space, as some mp3 players did. The theme has otherwise received some quality of life upgrades such as better fallback for music with missing tags (the original had none) and respecting 12/24hr preferences.

If you miss the loud VU meter of the OneBit theme, don't worry! I'm working on it, but it's not as simple as a bar tag. Hopefully I can bring more interesting stuff to the table soon.

PS. I wanted to make the accent colour customisable using the foreground colour but because this theme messes a lot with colours, it is actually infeasible. Real bummer.

* dump 250616-204214.png (11.75 kB, 320x240 - viewed 37 times.)

* dump 250616-205820.png (13 kB, 320x240 - viewed 37 times.)

* dump 250616-205600.png (11.93 kB, 320x240 - viewed 31 times.)
« Last Edit: June 16, 2025, 03:35:49 PM by gnomacor »
Logged

Offline Frankenpod

  • Member
  • *
  • Posts: 808
Re: OneBit_OLED
« Reply #1 on: June 17, 2025, 10:33:22 AM »
Quote from: gnomacor on June 16, 2025, 03:33:38 PM
PS. I wanted to make the accent colour customisable using the foreground colour but because this theme messes a lot with colours, it is actually infeasible. Real bummer.

Yeah, I tried doing things like

%?if(%ss(0,1,%St(background color),number),>,9)<%Vf(000000)|%Vf(ffffff)>%Vb(-)

i.e. querying the background colour and setting other colours based on that

But never really got it to work as expected, beyond, as above, getting a general idea of if it was a light or dark shade and setting foreground colour white or black accordingly.  Couldn't work out how to get the chosen colour as a number, that one could then manipulate to produce a different 'accent' colour.
Logged

Offline gnomacor

  • Member
  • *
  • Posts: 30
Re: OneBit_OLED
« Reply #2 on: June 17, 2025, 05:43:42 PM »
Quote from: Frankenpod on June 17, 2025, 10:33:22 AM
Quote from: gnomacor on June 16, 2025, 03:33:38 PM
PS. I wanted to make the accent colour customisable using the foreground colour but because this theme messes a lot with colours, it is actually infeasible. Real bummer.

Yeah, I tried doing things like

%?if(%ss(0,1,%St(background color),number),>,9)<%Vf(000000)|%Vf(ffffff)>%Vb(-)

no, because it's a hexadecimal it wouldn't see it as a number. I actually got it working brute-force by comparing it as a string:

%?or(%if(%ss(0,1,%St(background color)),=,8),%if(%ss(0,1,%St(background color)),=,9),%if(%ss(0,1,%St(background color)),=,a),%if(%ss(0,1,%St(background color)),=,b),%if(%ss(0,1,%St(background color)),=,c),%if(%ss(0,1,%St(background color)),=,d),%if(%ss(0,1,%St(background color)),=,e),%if(%ss(0,1,%St(background color)),=,f))<%Vf(ffffff)|%Vf(000000)>%Vb(-)

it has to be the upper part of the hexadecimal, the lower 0-7 approach won't work because apparently all the letters match to 1? that took some debugging.

also in the process of solving this, I also figured out how to solve the previous issue I had with foreground colours. so the problem was that, since now the ui viewport needs to use a different foreground colour (which applies to list elements). changing the foreground colour of the info viewport has a side effect of changing the WPS's foreground colour as well, which idk if it's intended. it's undocumented, but %Vf(-) lets you reset those colours and use the one actually set by the user.

the colour adjustments below were achieved with just stock rockbox settings. it's actually quite usable, thanks for the idea and guidance, unintentional it may be!

Edit: the adaptive theme is now uploaded as v1.1.

* dump 250617-233433.png (29.45 kB, 320x240 - viewed 40 times.)

* dump 250617-234141.png (32.45 kB, 320x240 - viewed 33 times.)
« Last Edit: June 17, 2025, 06:34:02 PM by gnomacor »
Logged

Offline Dook

  • Member
  • *
  • Posts: 77
    • D00k.net
Re: OneBit_OLED
« Reply #3 on: June 18, 2025, 09:59:27 AM »
I developed a similar solution for a WIP themify update last year, it's the same idea as yours but a little cleaner so I thought I'd share it if you wanted to give it a try.

%?or(%or(%if(%ss(0,1,%St(foreground color)),>,7),%if(%ss(0,1,%St(foreground color)),>=,a)),%or(%if(%ss(2,1,%St(foreground color)),>,7),%if(%ss(2,1,%St(foreground color)),>=,a)),%or(%if(%ss(4,1,%St(foreground color)),>,7),%if(%ss(4,1,%St(foreground color)),>=,a)))<%Vf(ffffff)|%Vf(000000)>

I use the foreground colour because you can just let the user do the hard work of setting good contrast, you can be sure that the user has set a readable colour and based on that you know you can use the right accent colour.
Logged

Offline gnomacor

  • Member
  • *
  • Posts: 30
Re: OneBit_OLED
« Reply #4 on: June 19, 2025, 06:07:48 AM »
thanks for the help, dook. nice to know that you can compare letters, is it perhaps based on ascii value?

aside from that, it turns out the battery indicator was broken. i learned it the hard way when my player ran out of battery. i woud have rather waited before i push another update but i had to. v1.2 fixes this and incorporates dook's logic.

also because the battery indicator logic was previously not modified, this also means that OneBit_VFD/Mono has a broken battery indicator.
« Last Edit: June 19, 2025, 06:09:48 AM by gnomacor »
Logged

Offline Dook

  • Member
  • *
  • Posts: 77
    • D00k.net
Re: OneBit_OLED
« Reply #5 on: June 19, 2025, 10:53:19 AM »
I'm not too sure, but I suspect the number comparisons are seperate to the character ones. I don't remember if I took down any notes when exploring this last year, but it definitely tries to interpret characters as numbers when comparing to a number (and ultimately struggles).

Re: battery icons. Try changing it out for a simpler version. The current way of doing battery icons is based on a legacy way of doing things with a ton of conditionals. It's not wrong, but it makes it far too easy for stuff like this to happen. You can plug the battery tag into the image loading tag itself, and rockbox will handle picking what image to show at the right time. It automatically spreads them out over the range so it doesn't matter how many you throw at it. Just make sure to account for error states, maybe check out the implementation in adwaitapod but I don't remember exactly how I handled that.

Simpler version example: %xd(battery_icons,%bl)
Logged

Offline delta

  • Member
  • *
  • Posts: 9
Re: OneBit_OLED
« Reply #6 on: June 19, 2025, 11:03:54 PM »
I’m pretty sure I fixed the battery indicator in my version of the theme. Unless I’m mistaken…. And I apologize if it rubbed anyone the wrong way by uploading so many recolors. I really just wanted to fix all the bugs with Ben’s theme and re-upload but I got creative and thought myself as well as others might enjoy some different version to play around with. I’ve been messing around with more colors and more codes to see if I can’t just make a customizable version but I’m failing to comprehend even the simplest of things in Rockbox like how to make a viewport or image a gradient type.
Logged

Offline gnomacor

  • Member
  • *
  • Posts: 30
Re: OneBit_OLED
« Reply #7 on: June 20, 2025, 03:25:33 PM »
Quote
I’m pretty sure I fixed the battery indicator in my version of the theme. Unless I’m mistaken….
I meant the original theme by Ben Clayton. I forgot that you also had the theme with a same name (which unfortunately is confusing, as others have pointed out).

Quote
And I apologize if it rubbed anyone the wrong way by uploading so many recolors. I really just wanted to fix all the bugs with Ben’s theme and re-upload but I got creative and thought myself as well as others might enjoy some different version to play around with.
There's really no shame in getting creative with existing themes, that's bulk of what I've uploaded as well. Perhaps I just wished there was more... variety.

Also you can upload .sbs and .wps files in the forum, so you can share colour variants that way.
Logged

Offline Frankenpod

  • Member
  • *
  • Posts: 808
Re: OneBit_OLED
« Reply #8 on: June 21, 2025, 06:11:30 PM »
Quote from: delta on June 19, 2025, 11:03:54 PM
I’m pretty sure I fixed the battery indicator in my version of the theme. Unless I’m mistaken…. And I apologize if it rubbed anyone the wrong way by uploading so many recolors. I really just wanted to fix all the bugs with Ben’s theme and re-upload but I got creative and thought myself as well as others might enjoy some different version to play around with. I’ve been messing around with more colors and more codes to see if I can’t just make a customizable version but I’m failing to comprehend even the simplest of things in Rockbox like how to make a viewport or image a gradient type.

Doesn't bother me - more choice is a good thing, as far as I'm concerned.  Only quibble I have with them is that the zip files (as downloaded) seem to be named generically as "rockbox" rather than having the same name as the theme in each case.  Makes it a bit confusing when trying to ensure one has the up-to-date version of each theme.

What I wanted to do (but it was beyond me to work out how to achieve it) was to take the foreground colour (set by whatever method, by the theme or via the colours menu) and then look at the components of it and tweak them to make accent colours in the same or similar hue, so, for example, if the foreground chosen was a shade of green, you could make certain parts of the theme a slightly darker or lighter green, or maybe tweak them towards turquoise or yellow slightly, and so on.  And do the same, with the same RGB offsets, if the base colour chosen was blue, say.  Another thought was to achieve that by overlaying bits with a 'grey', using transparency effects.

But in the end I ran out of steam and lost interest in making themes!
Logged

Offline gnomacor

  • Member
  • *
  • Posts: 30
Re: OneBit_OLED
« Reply #9 on: June 21, 2025, 07:40:27 PM »
speaking of foreground colours and accent colours I've been tossing around an idea about it... possibly one of the most interesting things a rockbox theme can do... not just for my theme... and I think I can manage it. I'm ironing out the details, and I just need some more spoons to get it done :P
Logged

Offline delta

  • Member
  • *
  • Posts: 9
Re: OneBit_OLED
« Reply #10 on: June 22, 2025, 03:24:41 AM »
Well I had no idea that I could set the name of the source folder the same as the theme name. Really sorry about that. Next update I push I will fix that for sure and will definitely make things a lot easier on the whole when uploading themes. The battery meter is fixed in all versions of the theme except his because I thought he had an underscore between OneBit and VFD. So I never really updated his theme but remade it under a new name by mistake. He simply had all the conditional tags backwords and was lacking an unknown conditional for when the battery is plugged in a low voltage so when you plugged it in before the battery just disappeared. The bitmap for the HDD indicator is custom and took me about 4 days to get working right as well just adding more layers to it. I run with the HDD still so it’s important to note what stage of a buffer i’m in before stowing it in my pocket while running or working. I’ve only tested it on 5th, 6th, and 7th gen’s thus far and the 5th struggles hard to even refresh the peak meter properly so I really appreciate some making a theme in the same aesthetic but much less resource intensive.
Logged

Offline Frankenpod

  • Member
  • *
  • Posts: 808
Re: OneBit_OLED
« Reply #11 on: June 22, 2025, 07:27:18 AM »
Quote from: delta on June 22, 2025, 03:24:41 AM
Well I had no idea that I could set the name of the source folder the same as the theme name. Really sorry about that.

Just to be clear - it's the outermost folder that gets zipped, that has the ".rockbox" folder within it, that can be (and I believe, is supposed to be, if I remember correctly the rules for uploading themes) named after the theme name.  You still have a ".rockbox" folder within that.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  OneBit_OLED
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.049 seconds with 17 queries.