小Zi 和 Coda:给「字与码」做两个能长期出镜的卡通角色
:::post-site-intro 封面图里的那个小程序员,最近越用越顺手。
他有一头有点乱的黑发,戴圆框眼镜,穿一件偏青绿色的连帽衫,看起来像是刚把一个小工具写完,又准备把过程写成博客。之前他只是一个封面角色,现在我打算给他一个正式名字:小Zi。
既然网站叫 ZiCode,只让小Zi一个人出镜有点单薄。我又按同一套方法补了一个女性角色:Coda,中文也可以叫「小码」。她不是小Zi的女版,而是另一个气质完全不同的创作搭档。小Zi偏工程,Coda偏视觉和产品;一个像是在调代码,一个像是在定方向。 :::

这篇不是讲「怎么写一句神奇提示词」。我越来越觉得,AI 生图真正有用的地方,不是偶尔抽一张惊艳的图,而是能不能把一个风格、一个角色、一个系列稳定下来。
博客封面尤其如此。单张图好看,只能解决一篇文章的问题;角色能反复出现,才会慢慢变成网站的一部分。
为什么需要一个固定角色
很多 AI 封面的问题不是不好看,而是太像一次性素材。
今天是赛博朋克,明天是水彩,后天又变成真实摄影。每一张单看都还可以,放到同一个博客列表里就散了。读者扫一眼,很难知道这些文章属于同一个作者、同一个栏目,甚至同一个网站。
固定角色的价值在这里:
| 设计目标 | 角色要解决的问题 |
|---|---|
| 识别度 | 读者不用看标题,也能感觉这是 ZiCode 的文章 |
| 连续性 | 不同主题的文章能共享同一种视觉语气 |
| 可扩展 | 后续可以做系列封面、插图、表情、教程图 |
| 降低成本 | 每次不用重新设计世界观,只要换场景和道具 |
但固定角色也有代价。提示词不能只写「一个可爱的程序员」。这句话太宽了,模型每次都会自由发挥:脸变了,衣服变了,年龄变了,甚至画风也变了。
所以小Zi的 prompt 里必须锁住几个东西:发型、眼镜、衣服、材质、场景气氛,还有不能出现的东西。
小Zi:先把角色钉住
小Zi的角色设定很简单:他不是超级英雄,也不是二次元主角。他更像一个平时会折腾 Linux、写脚本、做工具、写博客的人。
我保留了几个固定锚点:
- 黑色蓬松短发
- 圆框黑眼镜
- 青绿色连帽衫,白色抽绳
- 温和、专注、带一点好奇心
- 半写实 3D 卡通质感
- 暖白色工作室背景,带一点青绿色点缀
这些锚点不复杂,但每次都要出现。角色一致性不是靠模型记忆,而是靠提示词反复提醒。

下面是这张小Zi单人图使用的 prompt。它不短,但每一段都有用。
Use case: stylized-concept
Asset type: high-resolution PNG inline blog image, 2:1 horizontal, polished semi-realistic 3D editorial cartoon.
Primary request: Show Xiao Zi alone testing prompt variants for blog cover generation.
Subject: recurring ZiCode male programmer mascot: young male programmer, black voluminous short hair, round black glasses, teal hoodie with white drawstrings, friendly expression. He sits at a clean desk with a pen tablet, several floating blank image thumbnails, small color chips, and a neat prompt notebook. He looks thoughtful, comparing two visual directions.
Scene/backdrop: warm off-white studio with teal accents, soft plant blur, same material quality as existing ZiCode covers.
Composition: Xiao Zi on left third, floating image-generation workflow cards on right, all cards blank or abstract with no readable text. Make it feel useful for an article explaining prompt iteration.
Quality: crisp high-resolution PNG, tactile 3D cartoon, natural hands, no readable text, no logos, no watermark, no distorted UI walls.
这里面最关键的不是「high-resolution」这种质量词,而是几类锁定条件。
第一类是身份锁定。recurring ZiCode male programmer mascot 告诉模型,这不是随便画一个程序员,而是一个会反复使用的角色。
第二类是特征锁定。黑发、圆眼镜、青绿色连帽衫,比「年轻」「可爱」「程序员」这种词更重要。抽象词会漂,具体物件不容易漂。
第三类是场景锁定。暖白色工作室、青绿色点缀、软植物虚化,这些东西让图不会突然变成暗黑机房、未来城市或者游戏海报。
第四类是否定约束。no readable text 很重要。AI 生成图里只要出现文字,就很容易变成乱码。博客配图里可以有卡片、屏幕、白板,但最好让它们保持抽象,不要让模型真的写字。
新角色不能只是「女版小Zi」
有了小Zi之后,再做第二个角色,最容易偷懒的做法是:把小Zi变成女性,换个发型,衣服颜色不变。
这个方案我不喜欢。两个角色站在一起时,如果轮廓、衣服、性格都差不多,画面会很平。更糟的是,角色之间没有分工,读者也记不住。
所以 Coda 的方向一开始就反着来。
小Zi是软连帽衫、圆眼镜、工程师气质;Coda则是更利落的视觉导演。她不戴眼镜,穿短款浅色技术夹克,内搭珊瑚色上衣,用发夹、耳饰和手写笔做识别点。她看起来更像会站在白板前决定「这张图不够准,我们重来一版」的人。
名字也要和网站有关。ZiCode 可以拆成 Zi 和 Code。Coda 听起来接近 Code,又有音乐里「尾声、终段」的意思;中文昵称「小码」也自然。小Zi和小码合在一起,就是 ZiCode。

Coda 的角色 prompt 如下:
Use case: stylized-concept
Asset type: high-resolution PNG character portrait / inline blog image, vertical 3:4 composition, polished semi-realistic 3D editorial cartoon.
Primary request: Create the new ZiCode female character Coda, also called Xiao Ma, as a clean character design portrait.
Subject: Coda is a young female creative engineer, attractive, confident, professional; shoulder-length warm chestnut hair with a sleek side part; bright expressive eyes, no glasses; ivory cropped technical jacket with subtle pockets and zipper details over a deep coral top; dark tailored utility pants; small teal hairpin, metallic bracelet shaped like code braces, small geometric earrings. She holds a stylus in one hand and a small transparent prompt card in the other, with no readable text.
Backdrop: warm off-white studio background with subtle teal accent shadows, a simple standing desk edge and soft plant blur, same ZiCode 3D cartoon world as Xiao Zi.
Mood: complementary contrast to Xiao Zi's teal hoodie: sharper, more design-forward, warmer accent color, elegant and energetic.
Quality: crisp, high resolution, tactile materials, balanced proportions, natural hands, no text, no logos, no watermark, no cropped head, no extra fingers.
这段 prompt 里我特意加了 complementary contrast。这比单纯写「same style」更准确。
两个角色需要处在同一个世界里,但不能长得像同一个模板出来的。小Zi的关键词是 teal hoodie、round glasses、friendly;Coda的关键词是 ivory technical jacket、deep coral top、stylus、design-forward。颜色、道具、职业姿态都不同,放在一起才有张力。
两个人站在一起,才算角色系统
角色单独好看还不够。真正麻烦的是双人图。
双人图容易出几个问题:人物比例不一致、衣服互相串色、手部变形、两个人像情侣写真、场景道具太乱、画面塞满文字。
所以双人图的 prompt 需要明确三件事:
- 两个人各自是谁。
- 他们是什么关系。
- 这张图要表达什么工作流。
我不希望小Zi和Coda看起来只是在摆拍。更好的画面是:他们正在一起把一个创意从草图、提示词、生成图,推进到博客页面。
Use case: stylized-concept
Asset type: high-resolution PNG hero cover for www.zicode.com blog, 2:1 horizontal, polished semi-realistic 3D editorial cartoon.
Primary request: Create a ZiCode character-system hero image featuring two original recurring blog characters: Xiao Zi and Coda.
Reference context: Xiao Zi is the recurring ZiCode male programmer mascot: young male programmer, black voluminous short hair, round black glasses, teal hoodie with white drawstrings, friendly expression, warm skin, semi-realistic 3D cartoon rendering.
New female character: Coda, also called Xiao Ma. Young female creative engineer, attractive but professional, shoulder-length warm chestnut hair with a sleek side part, confident bright eyes, no glasses, cropped ivory technical jacket over a deep coral top, dark high-waisted utility skirt or tailored pants, small metallic code-bracelet and teal hairpin; elegant, energetic, contrasting Xiao Zi's soft hoodie look.
Scene/backdrop: warm off-white editorial studio with subtle teal depth, soft shadows, a clean desk-like platform holding a camera, stylus tablet, terminal blocks, color swatches, and image-generation thumbnails as blank cards.
Composition: Xiao Zi on left-middle, Coda on right-middle, both looking like a coherent duo for a tech blog brand; central object is a small glowing 3D creative pipeline sculpture connecting sketch, prompt card, rendered image, and blog page. Leave enough whitespace for blog crop, strong focal point, not crowded.
Style: same ZiCode semi-realistic 3D cartoon style, tactile materials, crisp high clarity, friendly but mature. No readable text, no logos, no watermark, no speech bubbles, no distorted hands, no cropped faces.
这张图里我最在意的是中间那个「创作流水线」。
它不是现实里真的会放在桌上的东西,而是一个可视化隐喻:从草图,到 prompt,到生成图,再到文章页面。对博客来说,这比单纯画两个人站着更有信息量。

一套可复用的角色 prompt 模板
把这次的过程整理一下,我会把角色类图片的 prompt 拆成五层。
| 层级 | 要写清楚什么 | 小Zi / Coda 的例子 |
|---|---|---|
| 身份层 | 角色是谁,会反复出现在哪里 | ZiCode recurring mascot |
| 特征层 | 发型、眼镜、衣服、道具、颜色 | 黑发圆眼镜青绿 hoodie;栗色短发浅色夹克珊瑚内搭 |
| 世界层 | 光线、背景、材质、画风 | 暖白工作室、半写实 3D、触感材质 |
| 任务层 | 这张图在文章里承担什么功能 | 封面、角色定妆、过程插图、场景图 |
| 约束层 | 不希望出现什么 | 无文字、无 logo、无水印、手不要变形、脸不要裁切 |
以后如果要做新的 ZiCode 图片,我不需要从零开始。只要保留身份层、特征层和世界层,再替换任务层就可以。
比如写一篇命令行工具的文章,可以让小Zi在终端前调试;写一篇设计工具的文章,可以让Coda在整理风格板;写一篇完整项目复盘,就让两个人在白板前拆流程。

角色设定要像代码一样维护
我以前做封面,更多是在追求「这张图好不好看」。现在会多问一个问题:这张图能不能纳入一个长期系统。
如果答案是不能,它可能还是一张漂亮图,但对博客品牌没有积累。下一次还得重新开始。
所以我会给小Zi和Coda维护一份简单的角色设定:
| 项目 | 小Zi | Coda / 小码 |
|---|---|---|
| 核心气质 | 工程、好奇、温和 | 设计、判断、利落 |
| 固定发型 | 黑色蓬松短发 | 栗色齐肩侧分 |
| 固定服装 | 青绿色连帽衫 | 浅色技术夹克、珊瑚色内搭 |
| 识别道具 | 圆框眼镜、笔记本、终端卡片 | 发夹、手写笔、风格板 |
| 常见场景 | 代码桌面、脚本实验、工具拆解 | 视觉板、产品草图、创作流程 |
| 不建议变化 | 不换成西装、盔甲、机器人 | 不做成小Zi换性别版本 |
这有点像写代码里的接口约束。不是为了限制创意,而是让每一次变化都在可控范围内。
角色可以换场景,可以换动作,可以参与不同主题;但脸、气质、服装锚点不能每次乱跳。只有这样,读者看多了才会觉得:哦,这是「字与码」的那两个角色。
后面可以怎么玩
小Zi和Coda只是第一步。真正有意思的是,把它们放进更多具体场景里。
比如:
- 小Zi在 WSL 里调图像程序,Coda在旁边检查输出比例。
- 小Zi写命令行脚本,Coda把结果整理成教程封面。
- 两个人在白板前拆一篇长文章的结构。
- Coda单独出现在设计、写作、内容生产相关的文章里。
- 小Zi单独出现在编程、Linux、自动化、工具链相关的文章里。
这样一来,ZiCode 不只是一个文字站点,也会慢慢有自己的视觉世界。
我不确定这两个角色以后会变成什么样。也许会越来越像博客里的固定演员,也许会扩展出更多小道具和场景。但至少现在,小Zi不再只是封面里的无名程序员,Coda也不是临时加出来的配角。
他们合在一起,就是 ZiCode 接下来可以长期使用的一套角色系统。