ssnangua/ColorTxt

「彩读 3.0 书源 × AI+」——一款会给内容上色的本地 TXT 小说阅读器,带给你不一样的阅读体验!(也支持打开常见的电子书格式,如 .epub)。还有章节识别、简繁互转、划线标注、记笔记、词典、翻译、多角色语音朗读、AI 阅读助手、书源找书等功能。支持 macOS、Windows 和 Linux。

🎨 ColorTxt – “彩读” 3.0

What it is – A cross‑platform desktop reader (Electron + Vue + Monaco) for plain‑text novels and simple e‑books. It adds a lot of “smart” reading aids: content‑aware colour‑highlighting, chapter detection, notes, dictionary, translation, multi‑voice TTS, and an AI Reading Assistant that can search the book with a local vector store and answer questions, generate mind‑maps, word‑clouds, character cards, and even AI‑generated illustrations.

Key capabilities

Feature What you get
Local file support Open .txt, .md directly; other e‑book formats (.epub, .mobi, .pdf, …) are converted to markdown on the fly.
Automatic chapter detection Built‑in regex rules plus user‑defined patterns to build a clickable chapter list.
Content colouring Custom highlight rules colour‑code characters, keywords or any user‑chosen words, giving a “syntax‑highlighted” reading experience.
Notes & bookmarks Inline line‑highlighting, sticky notes, and bookmarks with optional remarks.
Reading aids Full‑screen/zen mode, minimalist view, reading‑ruler (focus line), Pomodoro timer, auto‑scroll, line‑spacing & indentation controls, sticky title bar, progress restore.
Dictionary & translation Built‑in Wiktionary/Wikipedia look‑up, import of StarDict/MDict/DICT/Slob/BGL dictionaries, and multiple translation services (AI‑based, Microsoft, Google, DeepL, Baidu, etc.).
Multi‑voice TTS Uses system SAPI5, Edge TTS, or cloud services (Qwen‑3‑TTS, MiniMax, Xiaomi MiMo, Doubao, etc.) with per‑character voice cards for dramatized multi‑character narration.
AI Reading Assistant • RAG search – a local embedding model (BGE Small ZH or multilingual‑E5 Small) builds an index of the whole book; queries retrieve relevant passages before sending them to a chat model.
• Chat – ask plot questions, get summaries, generate mind‑maps or word‑clouds.
• Smart formatting – one‑click AI‑driven text cleanup (hard‑line‑break fixing, punctuation correction, dialogue unification, watermark removal, etc.) with a diff preview.
Character cards & illustration AI extracts character info, creates a summary card, and can call a text‑to‑image service (Stable Diffusion, OpenAI Images, DashScope, etc.) to generate a portrait.
Book‑pack (.ctz / .ctzx) Export/import a zip‑style bundle containing the original text, highlights, notes, bookmarks, and generated character assets – handy for sharing or syncing across devices.
WebDAV sync Sync configuration and book‑packs to a remote WebDAV server, enabling cross‑device continuity.
“Fish‑hiding” shortcuts Quick hide of the window or a transparent always‑on‑top reading pane for those moments you want to “pretend to work”.

AI/ML stack

  • Embedding (vector) models – optional local models (BGE Small ZH ≈ 47 MB, multilingual‑E5 Small ≈ 118 MB) or any OpenAI‑compatible remote embedding API.
  • Chat models – any OpenAI‑compatible endpoint (OpenAI, Azure, Ollama, LM‑Studio, DeepSeek, Moonshot, Claude‑compatible, etc.) is used for the conversational assistant, plot analysis, and smart formatting.
  • Text‑to‑image – supports local Stable Diffusion/WebUI, ComfyUI, or cloud services (OpenAI, Stability AI, DashScope, MiniMax, etc.) for character portrait generation.
  • Chinese NLP – @node-rs/jieba for tokenisation (word‑cloud), OpenCC for Simplified/Traditional conversion.

Why it matters

  • Turns a plain‑text novel into an interactive, AI‑enhanced experience without needing an internet‑only service.
  • All heavy‑weight operations (embedding, RAG, formatting) can run locally, keeping token costs low and preserving privacy.
  • The combination of colour‑coding, multi‑voice narration, and AI‑driven analysis is unusual for a desktop e‑book reader, targeting power readers, language learners, and fans who enjoy deep immersion.

Getting started

  1. Download the installer for Windows/macOS/Linux from the releases page.
  2. Open a .txt or .epub file – the app will auto‑detect chapters.
  3. In Settings → AI, configure an embedding endpoint (or download the bundled BGE model) and a chat endpoint (e.g., http://127.0.0.1:11434/v1 for Ollama).
  4. Use the AI Reading Assistant panel to ask questions, generate mind‑maps, or invoke Smart Formatting.
  5. Export a .ctz book‑pack to share your coloured, annotated novel with friends.

Limitations / known issues

  • Advanced line‑wrap algorithm can consume a lot of memory and may freeze on very large files.
  • Global hotkeys don’t work on Linux Wayland.
  • AI‑generated formatting may produce unexpected changes; always review the diff before applying.

Resources

  • Development docs: DOCS.md
  • Changelog: CHANGELOG.md
  • Community mentions: Ruanyf weekly, Linux.do thread.

ColorTxt is a genuine, feature‑rich desktop application that blends traditional e‑book reading with modern AI/ML capabilities such as local vector search, LLM chat, and text‑to‑image generation.

Related

  • Project
  • Project
  • Project
  • Project
  • Project