1
0
Fork 0

0.06: Add message icon for 'molly' and 'threema libre'

master
Gordon Williams 2024-03-06 09:17:15 +00:00
parent 9010405498
commit 0b15dfa48f
5 changed files with 17 additions and 15 deletions

View File

@ -4,3 +4,4 @@
Store all icons in a separate binary file (much faster lookup)
0.04: Add message icon for 'clock'
0.05: Add message icon for 'jira'
0.06: Add message icon for 'molly' and 'threema libre'

View File

@ -72,7 +72,9 @@ Promise.all(promises).then(function() {
require("fs").writeFileSync(__dirname+"/../icons.img", Buffer.from(iconData,"binary"));
console.log("Saving library");
require("fs").writeFileSync(__dirname+"/../lib.js", `exports.getImage = function(msg) {
require("fs").writeFileSync(__dirname+"/../lib.js", `// This file is auto-generated - DO NOT MODIFY
// If you want to add icons, change icons/icon_names.json and re-run icons/generate.js
exports.getImage = function(msg) {
if (msg.img) return atob(msg.img);
let s = (("string"=== typeof msg) ? msg : (msg.src || "")).toLowerCase();
if (msg.id=="music") s="music";
@ -87,16 +89,15 @@ exports.getColor = function(msg,options) {
if (st.iconColorMode == 'mono') return options.default;
const s = (("string"=== typeof msg) ? msg : (msg.src || "")).toLowerCase();
return {
// This file is generated by /icons/generate.js. If you need to modify its content, you should do it there instead.
// generic colors, using B2-safe colors
// DO NOT USE BLACK OR WHITE HERE, just leave the declaration out and then the theme's fg color will be used
/* generic colors, using B2-safe colors */ ${ /* DO NOT USE BLACK OR WHITE HERE, just leave the declaration out and then the theme's fg color will be used */"" }
"airbnb": "#ff385c", // https://news.airbnb.com/media-assets/category/brand/
"mail": "#ff0",
"music": "#f0f",
"phone": "#0f0",
"sms message": "#0ff",
// brands, according to https://www.schemecolor.com/?s (picking one for multicolored logos)
// all dithered on B2, but we only use the color for the icons. (Could maybe pick the closest 3-bit color for B2?)
"sms message": "#0ff", ${ /*
brands, according to https://www.schemecolor.com/?s (picking one for multicolored logos)
all dithered on B2, but we only use the color for the icons. (Could maybe pick the closest 3-bit color for B2?)
*/""}
"bibel": "#54342c",
"bring": "#455a64",
"discord": "#5865f2", // https://discord.com/branding

View File

@ -80,6 +80,7 @@
{ "app":"infinity", "icon":"reddit.png" },
{ "app":"slide", "icon":"reddit.png" },
{ "app":"signal", "icon":"signal.png" },
{ "app":"molly", "icon":"signal.png" },
{ "app":"skype", "icon":"skype.png" },
{ "app":"slack", "icon":"slack.png" },
{ "app":"snapchat", "icon":"snapchat.png" },
@ -89,6 +90,7 @@
{ "app":"telegram", "icon":"telegram.png" },
{ "app":"telegram foss", "icon":"telegram.png" },
{ "app":"threema", "icon":"threema.png" },
{ "app":"threema libre", "icon":"threema.png" },
{ "app":"tiktok", "icon":"tiktok.png" },
{ "app":"to do", "icon":"task.png" },
{ "app":"opentasks", "icon":"task.png" },

View File

@ -1,3 +1,5 @@
// This file is auto-generated - DO NOT MODIFY
// If you want to add icons, change icons/icon_names.json and re-run icons/generate.js
exports.getImage = function(msg) {
if (msg.img) return atob(msg.img);
let s = (("string"=== typeof msg) ? msg : (msg.src || "")).toLowerCase();
@ -13,16 +15,12 @@ exports.getColor = function(msg,options) {
if (st.iconColorMode == 'mono') return options.default;
const s = (("string"=== typeof msg) ? msg : (msg.src || "")).toLowerCase();
return {
// This file is generated by /icons/generate.js. If you need to modify its content, you should do it there instead.
// generic colors, using B2-safe colors
// DO NOT USE BLACK OR WHITE HERE, just leave the declaration out and then the theme's fg color will be used
/* generic colors, using B2-safe colors */
"airbnb": "#ff385c", // https://news.airbnb.com/media-assets/category/brand/
"mail": "#ff0",
"music": "#f0f",
"phone": "#0f0",
"sms message": "#0ff",
// brands, according to https://www.schemecolor.com/?s (picking one for multicolored logos)
// all dithered on B2, but we only use the color for the icons. (Could maybe pick the closest 3-bit color for B2?)
"sms message": "#0ff",
"bibel": "#54342c",
"bring": "#455a64",
"discord": "#5865f2", // https://discord.com/branding
@ -67,4 +65,4 @@ exports.getColor = function(msg,options) {
"youtube": "#f00", // https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors
}[s]||options.default;
};

View File

@ -1,7 +1,7 @@
{
"id": "messageicons",
"name": "Message Icons",
"version": "0.05",
"version": "0.06",
"description": "Library containing a list of icons and colors for apps",
"icon": "app.png",
"type": "module",