Thanks to visit codestin.com
Credit goes to github.com

Skip to content

wangrongding/rongding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rongding

我的终端个人名片 🪪

npm version license npm downloads

预览

image

使用

npx rongding

特性

  • 🌈 渐变边框 — 边框沿周长顺时针渐变着色,内容区域颜色完全独立
  • 🎨 自定义内容样式 — 内容使用 chalk 自由定义颜色和样式
  • 🔗 终端超链接 — 使用 OSC 8 协议,支持终端内点击跳转(iTerm2 / Windows Terminal / GNOME Terminal 等)
  • 📦 零配置npx rongding 即可运行,无需安装

实现原理

  1. 使用 boxen 生成带边框的文本 box
  2. 顺时针方向(顶 → 右 → 底 → 左)收集所有边框字符的位置
  3. 根据字符在周长上的位置,通过 RGB 线性插值计算渐变色
  4. 使用 chalk.rgb() 逐字符着色边框,内容区域保持不变

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published