Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
03482f3
Refactor app.js for improved readability and structure
RKBoss6 Dec 10, 2025
5f1b686
Refactor font loading and color queue initialization
RKBoss6 Dec 11, 2025
d9c6dd9
Merge branch 'espruino:master' into dailycolclkupdate
RKBoss6 Dec 22, 2025
a19090f
Refactor settings.js to manage background colors
RKBoss6 Dec 22, 2025
f355026
Refactor app.js for improved readability and structure, wrap in a fun…
RKBoss6 Dec 22, 2025
08d8eae
Update version and description in metadata.json
RKBoss6 Dec 22, 2025
f05420b
Delete apps/dailycolorclk/default.json, as there's no need for it any…
RKBoss6 Dec 22, 2025
2da26c7
Remove duplicate entry in metadata.json storage
RKBoss6 Dec 22, 2025
4c75f1c
Add ChangeLog for app versions 0.01 and 0.02
RKBoss6 Dec 22, 2025
7d2277f
Enhance README with detailed app features
RKBoss6 Dec 22, 2025
1262cbf
Change color variable to let in modifyColor function
RKBoss6 Dec 22, 2025
5a68a3c
Fix settings loading by correcting JSON read logic
RKBoss6 Dec 22, 2025
0aec870
Update settings retrieval in app.js
RKBoss6 Dec 22, 2025
26d6fa3
Update settings.js
RKBoss6 Dec 22, 2025
ad039cd
Update settings.js
RKBoss6 Dec 22, 2025
24aeff7
Update apps/dailycolorclk/settings.js
RKBoss6 Dec 22, 2025
db5ad61
Fix array shuffle function to return shuffled array
RKBoss6 Dec 22, 2025
6fb59e7
Refactor equality checks to strict equality
RKBoss6 Dec 22, 2025
3fe1587
Fix bug with back not working from dithered colors
RKBoss6 Dec 23, 2025
d910243
Add confirm prompt before regenerating queue
RKBoss6 Dec 23, 2025
e33c043
Enhance README with battery-friendly design details
RKBoss6 Jan 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/dailycolorclk/ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0.01: New App!
0.02: Rework of the app to include a color queue avoiding duplicate colors back to back, smarter settings page, more colors, and now easier to add your own.
17 changes: 11 additions & 6 deletions apps/dailycolorclk/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Daily Color Clock
A clock that randomly changes the accent color every day to freshen up the clock face every day.

This is forked from `Slope Clock ++`
A clock that randomly changes the accent color every day to freshen up the clock face every day. This app uses a queue based color system, so each day is not a repeat of the previous color. It is generated in a random order when you manually regenerate, or when the old queue runs out.

![](Scr4.png)
## Settings
Choose what colors are enabled or disabled, which affects the colors it can be.

#### <b>Dithered colors</b>:
The app is designed to be as battery-friendly as possible, and clears certain areas and utilizes string background to remove the need for full screen clears/draws. If any problems arise where the background has another app/terminal behind it, simply reload the clock.
## Settings
### Show/hide widgets
Choose whether widgets are shown or hidden
### Regenerate queue
If you changed any color toggles, the queue will not update by itself. Instead, regenerate the queue here, or wait until the queue runs out and is automatically regenerated after a certain number of days.
### Dithered colors
Colors that are dithered, which may affect quality.

#### Adding your own colors
To add your own colors to the mix, go to `dailycolorclk.settings.js` in the web IDE and add your own color entries to the `colors` list. The list takes an object that contains a name, the hex code of the color to display, and a boolean for whether it's dithered or not.

From there, upload it, and if you go to the settings page, there will be a new color in the dithered or normal section that you can toggle to add your color to the queue.

## Creator
RKBoss6
350 changes: 172 additions & 178 deletions apps/dailycolorclk/app.js
Original file line number Diff line number Diff line change
@@ -1,180 +1,174 @@
{ // must be inside our own scope here so that when we are unloaded everything disappears

let settings;
let getSettings=function(){
settings = Object.assign(
require("Storage").readJSON("dailycolorclk.default.json", true) || {},
require("Storage").readJSON("dailycolorclk.json", true) || {}
);
}
let writeSettings=function(){
require("Storage").writeJSON("dailycolorclk.json", settings);
}
getSettings();

const fontBitmap = E.toString(require('heatshrink').decompress(atob('AC1+A40H/gIGn/4A4sB//wDI3/8AIFj//wAIFv/+EQ4rGESROHDI4rBCA0BGYwAKDYI+Ogf/MI1/MI0P/4iFFIIABEQk/A4IiEPIIZGFIP/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(fontBitmap, 46, atob("ER0mGCMjJiMkIiUkEg=="), 70|65536);
return this;
}

let drawTimeout;


const slopeHeight = 90;
const fontBorder = 13;
const hoursYPos=68;
const minOffset=4; //offset from slope
const slopeBorder = 4;

let R;
let dateStr = "";
let bgColor = settings.colorSaved;
let changeBGColor = function() {
let bgColors = [];
if (settings.colorYellow) bgColors.push("#ff0");
if (settings.colorCyan) bgColors.push("#0ff");
if (settings.colorMagenta) bgColors.push("#f0f");
if (settings.colorWhite) bgColors.push("#fff");
if (settings.colorRed) bgColors.push("#f00");
if (settings.colorGreen) bgColors.push("#0f0");
if (settings.colorBlue) bgColors.push("#00f");
if (settings.colorOrange) bgColors.push("#FC6A03");
if (settings.colorPurple) bgColors.push("#B200ED");
if (settings.colorBlack) bgColors.push("#000");

let oldColorIdx = bgColors.indexOf(settings.colorSaved);
if (oldColorIdx !== -1) bgColors.splice(oldColorIdx, 1);
let col = bgColors[(Math.random()*bgColors.length)|0] || "#000";

settings.colorSaved = col;
writeSettings();
}
let checkForColorChange = function() {
let dayNow = new Date().getDay();
if (settings.dayChanged != dayNow) {
settings.dayChanged = dayNow;
changeBGColor();
load();
(function () {
let settings;
let getSettings = function () {
settings = Object.assign(
require("Storage").readJSON("dailycolorclk.json", true) || {}
);
if (!settings.bgColors) settings.bgColors = ["#0F0", "#FF0", "#F00", "#0FF"];
}
}

//draws bg color once, erases background
let preDraw=function(){
g.setColor(g.theme.bg).fillRect(0,0,g.getWidth(),g.getHeight());
g.setColor(bgColor).fillRect(
0,slopeHeight,g.getWidth(), g.getHeight()
);

}
// Draw the hour, minute, and date
let draw = function() {

checkForColorChange();

if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = setTimeout(draw, 60000 - (Date.now() % 60000));

R = Bangle.appRect;


var date = new Date();
var local_time = require("locale").time(date, 1);
var hourStr = " "+local_time.split(":")[0].padStart(2,'0')+" ";
var minStr = " "+local_time.split(":")[1].padStart(2,'0')+" ";

dateStr = require("locale").dow(date,1) + ', ' +
require("locale").month(date,1) + " " + date.getDate();

//clear old hour
g.setColor(g.theme.bg);
g.fillRect(0,24,96,88);
// Draw hour
g.setColor(g.theme.fg)
.setFontAlign(-1, 0)
.setFont("PaytoneOne")
.drawString(hourStr, fontBorder, hoursYPos);






// draw minutes
var yo = slopeHeight + minOffset;
g.setColor(bgColor);
//clear old minutes
g.fillRect(92,92,g.getWidth(),152);
g.setFontAlign(1, -1).setFont("PaytoneOne")
.setColor(g.theme.bg).drawString(minStr,g.getWidth()-7, yo);

// Transition bar
g.setColor(g.theme.bg).fillRect(
0,slopeHeight-slopeBorder,g.getWidth(), slopeHeight
);
// Draw date
g.setColor(g.theme.bg)
.setFontAlign(0, 0)
.setFont("Vector",16)
.drawString(dateStr, R.x + R.w/2, R.y+R.h-13);

};



// Clock info menus
let clockInfoDraw = (itm, info, options) => {
let texty = options.y+41;
g.reset().setClipRect(options.x, options.y, options.x+options.w-1, options.y+options.h-1);
g.setFont("Vector",15).setBgColor(options.bg).clearRect(options.x, texty-15, options.x+options.w-2, texty);

g.setColor(options.focus ? options.hl : options.fg);
if (options.x < g.getWidth()/2) {
let x = options.x+2;
if (info.img) g.clearRect(x, options.y, x+23, options.y+23).drawImage(info.img, x, options.y);
g.setFontAlign(-1,1).drawString(info.text, x,texty);
} else {
let x = options.x+options.w-3;
if (info.img) g.clearRect(x-23, options.y, x, options.y+23).drawImage(info.img, x-23, options.y);
g.setFontAlign(1,1).drawString(info.text, x,texty);
let writeSettings = function () {
require("Storage").writeJSON("dailycolorclk.json", settings);
}
getSettings();

g.clear();
const locale = require("locale");

const fontBitmap = E.toString(require('heatshrink').decompress(atob('AC1+A40H/gIGn/4A4sB//wDI3/8AIFj//wAIFv/+EQ4rGESROHDI4rBCA0BGYwAKDYI+Ogf/MI1/MI0P/4iFFIIABEQk/A4IiEPIIZGFIP/OQgpC//AFIw7EFIR6EFJAHCFJBLDFMKWBFJPwHQ6XEGQS6FFIy5CYQwiBFIgiCZQwiBcgwAkNQRQFa4SU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CRwQzCAAQ9CM4IIFCAodCA4oASn4HGRgKBBAAhWEAARxCCIjlDBAj/ECAy/CCAqLCCAhpECAY9EA4Y0DKgLRFCAfgFYYQCHQL0CCAfwG4IrBcAfAAgJXBHYQZBh5XCa4RLBn4CBKoYfBEQn8EQ/jAoM/EQf+I4IeBIoJACn5oEg5UCNAkf8D8CRYd+LIg8BgICBSoYQBgzqCVwpiEcYqcFYIi/DAAI9CcQYIDCAoaCA4oAOj5JFJYTMCE4rvCAAKLCGAkPEQ0BAgQiEn6uDEQQeBEQyuEDoTKBEQqDCEQqmCEQjADEQgHCEQgpBEQvBdYYiDfgb5BcAgQDa4bIEJQTZFIQYyCEQopCEQqoDEQbhEMooiF8DRFFIoiDaQgiCFIgiDeg4pFbogiFFIoAfh5ZFFgKMG+BaBIIYFB+B0BBAbQB+aWEgYFB96OEeQbaJ/+ADIbKFDIo0CDIrkBegorCaIf8VQc//wKB8EfFYQFBFoINBK4I8BwEfAoJXCQ4TCBBoQUCGwOASoYUBg4FBEQnAn/8CYIiC/+BRIIEBEQJJBAAP9NCiLOW4QrDW4jIBAAbiD//7DIhgB/+PZAg9B/guBfogNBFwJNBAAitDBAoQGAB9/HIQADHQJcCHggIGPQQaFToSrBAASUDKYxmDmAZEXoMDVwpeBn6uFfoLRGwE/aIv+fIUAg4DBv/4XYK/CHQP/8L0DGIIcBz42CDoOAH4YiBh4ZBH4YiCaoLlCEQxZDIAQ/BQoYFBKgL0EQQODCAhoECAYoDWAhLDHYZLEYIiuCCAhUDaQoQHGgYQEBAQQEHob0FBAJUCAAjqCAD8DBA9/SIM/SgQ9CKQQIDj7TCIAhOCv5iDDILTCLQaeBaYXgSoihCFYaCCv4rDERrBEIoQlBFYfwAQKXENAV/VAl4AQN+RJQ=')));

let setFontPaytoneOne = function (g) {
g.setFontCustom(fontBitmap, 46, atob("ER0mGCMjJiMkIiUkEg=="), 70 | 65536);
}

let drawTimeout;

const slopeHeight = 90;
const fontBorder = 13;
const hoursYPos = 68;
const minOffset = 4;
const slopeBorder = 4;
let bgColor;
let dateStr = "";

let shuffleArray = function (array) {
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
const t = array[i]; array[i] = array[j]; array[j] = t;
}
return array;
}

let generateQueue = function () {
settings.colorQueue = [];
let colors = settings.bgColors.slice();
shuffleArray(colors);
colors.forEach(c => settings.colorQueue.push(c));
}

let checkForColorChange = function () {
let dayNow = new Date().getDay();
let changed = false;

if (settings.regenerate) {
generateQueue();
settings.regenerate = false;
changed = true;
}

if (!settings.colorQueue || settings.colorQueue.length < 1) {
generateQueue();
changed = true;
}

if (settings.dayChanged === undefined || settings.dayChanged !== dayNow) {
if (settings.dayChanged !== undefined) {
settings.colorQueue.shift();
if (settings.colorQueue.length < 1) generateQueue();
changed = true;
}
settings.dayChanged = dayNow;
changed = true;
}

bgColor = settings.colorQueue[0];
if (changed) {
writeSettings();
load();
}
}

let preDraw = function () {
g.setColor(g.theme.bg).fillRect(0, 0, g.getWidth(), g.getHeight());
g.setColor(bgColor).fillRect(0, slopeHeight, g.getWidth(), g.getHeight());
}
g.setClipRect(0,0,g.getWidth()-1, g.getHeight()-1);
};

let clockInfoItems = require("clock_info").load();
let clockInfoMenu = require("clock_info").addInteractive(clockInfoItems, {
app:"slopeclockpp",x:98, y:38, w:70, h:50,
draw : clockInfoDraw, bg : g.theme.bg, fg : g.theme.fg, hl :
(g.theme.fg===g.toColor(bgColor))?"#f00":bgColor
});
let clockInfoMenu2 = require("clock_info").addInteractive(clockInfoItems, {
app:"slopeclockpp",x:10, y:102, w:70, h:50,
draw : clockInfoDraw, bg : bgColor, fg : g.theme.bg, hl :
(g.theme.fg===g.toColor(bgColor))?"#f00":g.theme.fg
});

// Show launcher when middle button pressed
Bangle.setUI({
mode : "clock",
remove : function() {
if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = undefined;
delete Graphics.prototype.setFontPaytoneOne;
clockInfoMenu.remove();
delete clockInfoMenu;
clockInfoMenu2.remove();
delete clockInfoMenu2;
},
redraw: draw,
});

Bangle.loadWidgets();
if (settings.hideWidgets) require("widget_utils").swipeOn();
else setTimeout(Bangle.drawWidgets,0);
preDraw();
draw();
clockInfoMenu.redraw();
clockInfoMenu2.redraw();

}

let draw = function () {
try {
checkForColorChange();
if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = setTimeout(draw, 60000 - (Date.now() % 60000));

let R = Bangle.appRect;
let date = new Date();
let t = locale.time(date, 1).split(":");
let hourStr = " " + t[0].padStart(2, '0') + " ";
let minStr = " " + t[1].padStart(2, '0') + " ";

dateStr = locale.dow(date, 1) + ', ' + locale.month(date, 1) + " " + date.getDate();

g.setColor(g.theme.bg).fillRect(0, 24, 96, 88);

g.setColor(g.theme.fg).setFontAlign(-1, 0);
setFontPaytoneOne(g);
g.drawString(hourStr, fontBorder, hoursYPos);

let yo = slopeHeight + minOffset;
g.setColor(bgColor).fillRect(92, 92, g.getWidth(), 152);
g.setFontAlign(1, -1);
setFontPaytoneOne(g);
g.setColor(g.theme.bg).drawString(minStr, g.getWidth() - 7, yo);

g.setColor(g.theme.bg).fillRect(0, slopeHeight - slopeBorder, g.getWidth(), slopeHeight);

g.setFont("Vector", 16).setFontAlign(0, 0);
g.drawString(dateStr, R.x + R.w / 2, R.y + R.h - 13);
} catch (e) {
drawTimeout = undefined;
throw e;
}
}

checkForColorChange();

let clockInfoDraw = (itm, info, options) => {
let texty = options.y + 41;
g.reset().setClipRect(options.x, options.y, options.x + options.w - 1, options.y + options.h - 1);
g.setFont("Vector", 15).setBgColor(options.bg)
.clearRect(options.x, texty - 15, options.x + options.w - 2, texty);

g.setColor(options.focus ? options.hl : options.fg);
if (options.x < g.getWidth() / 2) {
let x = options.x + 2;
if (info.img) g.clearRect(x, options.y, x + 23, options.y + 23).drawImage(info.img, x, options.y);
g.setFontAlign(-1, 1).drawString(info.text, x, texty);
} else {
let x = options.x + options.w - 3;
if (info.img) g.clearRect(x - 23, options.y, x, options.y + 23).drawImage(info.img, x - 23, options.y);
g.setFontAlign(1, 1).drawString(info.text, x, texty);
}
g.setClipRect(0, 0, g.getWidth() - 1, g.getHeight() - 1);
};

let clockInfoItems = require("clock_info").load();
let clockInfoMenu = require("clock_info").addInteractive(clockInfoItems, {
app: "dailycolorclk", x: 98, y: 38, w: 70, h: 50,
draw: clockInfoDraw, bg: g.theme.bg, fg: g.theme.fg,
hl: (g.theme.fg === g.toColor(bgColor)) ? "#f00" : bgColor
});
let clockInfoMenu2 = require("clock_info").addInteractive(clockInfoItems, {
app: "dailycolorclk", x: 10, y: 102, w: 70, h: 50,
draw: clockInfoDraw, bg: bgColor, fg: g.theme.bg,
hl: (g.theme.fg === g.toColor(bgColor)) ? "#f00" : g.theme.fg
});

Bangle.setUI({
mode: "clock",
remove: function () {
if (drawTimeout) clearTimeout(drawTimeout);
drawTimeout = undefined;
clockInfoMenu.remove();
clockInfoMenu2.remove();
clockInfoMenu = null;
clockInfoMenu2 = null;
},
redraw: draw
});

Bangle.loadWidgets();
if (settings.hideWidgets) require("widget_utils").swipeOn();
else setTimeout(Bangle.drawWidgets, 0);
preDraw();
draw();
clockInfoMenu.redraw();
clockInfoMenu2.redraw();
})()
12 changes: 0 additions & 12 deletions apps/dailycolorclk/default.json

This file was deleted.

Loading