Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 09-29-2021, 09:05 PM   #1
chinax
Member
chinax composes epic poetry in binary.chinax composes epic poetry in binary.chinax composes epic poetry in binary.chinax composes epic poetry in binary.chinax composes epic poetry in binary.chinax composes epic poetry in binary.chinax composes epic poetry in binary.chinax composes epic poetry in binary.chinax composes epic poetry in binary.chinax composes epic poetry in binary.chinax composes epic poetry in binary.
 
Posts: 24
Karma: 90156
Join Date: Jul 2017
Device: Nook Glowlight, Sony DPT-CP1
Thanks for Cover Generation Themes + Random Color Scheme Generator Tool

I noticed in the most recent update that we can now save our preferred Cover Generation settings as 'themes' in calibre itself, thanks to this poster/thread. I was able to copy over my pre-existing theme backups with no trouble, and am relieved not to have to do it manually anymore! It had been the most time-consuming aspect of my calibre usage.

I love to regularly refresh my color schemes, so I thought I'd post my regex templates that I paste into this site (which I meant to do a while ago anyway).

Code:
regex template for cover generation on this site: 
=====================================================
https://onlinetexttools.com/generate-text-from-regex
=====================================================

============================
ANY COLOR — IDEAL FOR BOLD/HYPERVISIBLE FONTS
============================
"#any_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"\n\},
"#any_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"\n\},
"#any_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"\n\},
"#any_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"\n\},



=================================
or 4 ANY + the 4 OPTIMIZED styles
=================================
"#any_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"\n\},
"#any_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"\n\},
"#any_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"\n\},
"#any_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "contrast_color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]"\n\},
"#white_text_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]",\n "contrast_color1": "[f][6-9a-f][f][6-9a-f][f][6-9a-f]",\n "contrast_color2": "[f][6-9a-f][f][6-9a-f][f][6-9a-f]"\n\},\n
"#black_text_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]",\n "contrast_color1": "[0-3][0-9a-f][0-3][0-9a-f][0-3][0-9a-f]",\n "contrast_color2": "[0-3][0-9a-f][0-3][0-9a-f][0-3][0-9a-f]"\n\},\n 
"#light_on_dark_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-5][0-9a-f][0-5][0-9a-f][0-5][0-9a-f]",\n "color2": "[0-5][0-9a-f][0-5][0-9a-f][0-5][0-9a-f]",\n "contrast_color1": "[6-9a-f][0-9a-f][6-9a-f][0-9a-f][6-9a-f][0-9a-f]",\n "contrast_color2": "[6-9a-f][0-9a-f][6-9a-f][0-9a-f][6-9a-f][0-9a-f]"\n\},\n
"#dark_on_light_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[6-9a-f][0-9a-f][6-9a-f][0-9a-f][6-9a-f][0-9a-f]", \n "color2": "[6-9a-f][0-9a-f][6-9a-f][0-9a-f][6-9a-f][0-9a-f]", \n "contrast_color1": "[0-3][0-9a-f][0-3][0-9a-f][0-3][0-9a-f]", \n "contrast_color2": "[0-3][0-9a-f][0-3][0-9a-f][0-3][0-9a-f]"\n\},


=====================
JUST OPTIMIZED COLORS
=====================
"#white_text_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]",\n "contrast_color1": "[f][6-9a-f][f][6-9a-f][f][6-9a-f]",\n "contrast_color2": "[f][6-9a-f][f][6-9a-f][f][6-9a-f]"\n\},\n
"#black_text_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]", \n "color2": "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]",\n "contrast_color1": "[0-3][0-9a-f][0-3][0-9a-f][0-3][0-9a-f]",\n "contrast_color2": "[0-3][0-9a-f][0-3][0-9a-f][0-3][0-9a-f]"\n\},\n 
"#light_on_dark_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[0-5][0-9a-f][0-5][0-9a-f][0-5][0-9a-f]",\n "color2": "[0-5][0-9a-f][0-5][0-9a-f][0-5][0-9a-f]",\n "contrast_color1": "[6-9a-f][0-9a-f][6-9a-f][0-9a-f][6-9a-f][0-9a-f]",\n "contrast_color2": "[6-9a-f][0-9a-f][6-9a-f][0-9a-f][6-9a-f][0-9a-f]"\n\},\n
"#dark_on_light_[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]": \{\n "color1": "[6-9a-f][0-9a-f][6-9a-f][0-9a-f][6-9a-f][0-9a-f]", \n "color2": "[6-9a-f][0-9a-f][6-9a-f][0-9a-f][6-9a-f][0-9a-f]", \n "contrast_color1": "[0-3][0-9a-f][0-3][0-9a-f][0-3][0-9a-f]", \n "contrast_color2": "[0-3][0-9a-f][0-3][0-9a-f][0-3][0-9a-f]"\n\},

.
It's written to fit calibre's .json format (and have unique names), so you can paste it into your pre-existing .json files/themes. You can find them by going to: [Preferences > Miscellaneous > Open calibre configuration folder > cover-generation-themes] then open with notepad or any text editor you like.

Theoretically, you can have every possible color combination saved as a color scheme (practically, it depends on how much RAM calibre can use).

It should be clear how to paste it in without messing anything up, but obviously one should back up any file before tinkering with it.

Last edited by chinax; 09-29-2021 at 09:39 PM.
chinax is offline   Reply With Quote
Old 09-29-2021, 10:20 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,542
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You are welcome
kovidgoyal is offline   Reply With Quote
Advert
Reply

Tags
cover generation, custom covers, edit metadata, themes


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
change calibre-server's color scheme? Geremia Server 1 04-04-2021 01:14 AM
Why No Color Scheme? d351r3d Sigil 5 01-17-2020 11:07 AM
Editor Settings > Color Scheme Agama Editor 2 12-23-2013 10:43 AM
Deepak-Chopra random qoute generator kennyc Lounge 6 07-03-2012 02:48 PM


All times are GMT -4. The time now is 03:38 PM.


MobileRead.com is a privately owned, operated and funded community.