mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5321] [Feature]: Inline Character Name Coloring in Message Text #2939
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#2939
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ylli-selmani on GitHub (Aug 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5321
Originally assigned to: @SpicyMarinara on GitHub.
I'll be honest, i totally did this for myself already (or rather, vibecoded it with Professor Mari and Glm 5.2), but you still have to create a FR first, and all that, so... yeah. :) Please be gentle
What problem does this solve?
In multi-character roleplays or conversations, it can be hard to tell at a glance who's being referred to in the prose. Character names blend into the surrounding text, especially in long messages with multiple characters mentioned. The speaker header at the top of each message box already uses each character's assigned name color (including gradients), but that coloring doesn't carry over into the body text itself, so you lose that visual anchor the moment you start reading.
This is something the AI Dungeon extension "Dungeon Extension v2" solved really well, and I full-on stole the idea from it because it just makes the reading experience so much better.
Proposed solution
Add an opt-in toggle under Text Rules called "Color Character Names in Text" that, when enabled, automatically detects character names in message text and colors them using each character's assigned nameColor. This should support:
Only characters that have been added to the chat are eligible for name coloring. It doesn't matter if they're currently enabled or disabled in the chat's character list, as long as they're present. Characters not added to the chat won't get their names colored even if their name appears in the text.
The coloring should work in both the markdown rendering path and the HTML rendering path, and should not interfere with paragraph spacing, text stroke, or the existing text shadow/halo applied to message content. Gradient name spans need filter: drop-shadow() instead of text-shadow (which breaks with background-clip: text), and the inherited WebkitTextStroke needs to be zeroed on gradient spans to avoid a visible inward border artifact.
Alternatives considered
Additional context
Inspired by the AI Dungeon extension Dungeon Extension v2, which does something similar and makes multi-character stories significantly more readable IMO.
The feature is entirely opt-in (off by default) and lives under the existing Text Rules settings section, so it doesn't change anything for users who don't want it.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
A few screenshots from my personal branch.
Technically not "mock-up" anymore, as it's already working, but same idea.
Showcase of gradient names, a single solid-color name, as well as support for name Aliases, set inside a charcters colors tab, right at the bottom.

Mobile view, with 'Force Solid Color' toggled on.

Name Aliases Ui inside Colors Tab

Mobile plus Light mode is... okay. Shadow on gradient's look a bit too strong. (maybe auto force solid color in light mode or something?)
Settings Panel with Subtoggle for solid Colors

@SpicyMarinara commented on GitHub (Aug 20, 2026):
I think this is pretty cool, would love to have it! Thank you!