# 中国传统色
**Repository Path**: undeadway/chinese-traditional-color
## Basic Information
- **Project Name**: 中国传统色
- **Description**: 根据《中国传统色:故宫里的色彩美学》一书,写记录的 CSS 配色。
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 3
- **Forks**: 0
- **Created**: 2024-05-14
- **Last Updated**: 2025-04-27
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 1. 说明

根据《中国传统色:故宫里的色彩美学》(以下简称为“原书”)一书,将书中的色彩翻译成前端代码 。
## 1.1. 关于颜色名
因为原书中所有颜色的命名非常文艺,不好翻译,至少我不认为我有能力去翻译。
[](./dist/index.html)
所以所有颜色全部写成汉语拼音。
不过,节气名参照中国气象局的翻译 注0(略有修改)。
| 中文 | 中国气象局翻译 | 变量名 |
| --- | --- | --- |
| 立春 | the Beginning of Spring | SringBeginning |
| 雨水 | Rain Water | RainWater |
| 惊蛰 | the Waking of Insects | WakingInsects |
| 春分 | the Spring Equinox | SpringEquinox |
| 清明 | Pure Brightness | PureBrightness |
| 谷雨 | Grain Rain | GrainRain |
| 立夏 | the Beginning of Summer | SummerBeginning |
| 小满 | Lesser Fullness of Grain | LesserFullness |
| 芒种 | Grain in Beard | GrainBeard |
| 夏至 | the Summer Solstice | SummerSolstice |
| 小暑 | Lesser Heat | LesserHeat |
| 大暑 | Greater Heat | GreaterHeat |
| 立秋 | the Beginning of Autumn | AutumnBeginning |
| 处暑 | the End of Heat | HeatEnd |
| 白露 | White Dew | WhiteDew |
| 秋分 | the Autumn Equinox | AutumnEquinox |
| 寒露 | Cold Dew | ColdDew |
| 霜降 | Frost's Descent | FrostDescent |
| 立冬 | the Beginning of Winter | WinterBeginning |
| 小雪 | Lesser Snow | LesserSnow |
| 大雪 | Greater Snow | GreaterSnow |
| 冬至 | the Winter Solstice | WinterSolstice |
| 小寒 | Lesser Cold | LesserCold |
| 大寒 | Greater Cold | GreaterCold |
同时,为了避免颜色名同音,加上了节气的名称。
再加上`CTC` 命名空间(前缀),构成完整的名称。
CTC 即 **C**hinese **T**radtional **C**olor 的缩写。
CSS 的格式:`CTC_节气_颜色名`
例:
```
CTC_AutumnBeginning_qunqing
```
**JS 请参阅 API 的使用。**
### 1.1.1. 关于读音
因为这里的颜色名都是从书上抄下来的,具体怎么读我也不清楚。
所以不管是否真有这个词,均以字面的汉字读音来命名变量名。
下面列举一些特殊情况。
#### 1.1.1.1. 多音字
如果颜色名中有多音字,读音选择参考如下
| 多音字 | 涉及颜色名 | 拼音 | 变量名 | 参考来源 | 备注 |
| --- | --- | --- | --- | --- | --- |
| 曾 | 曾青 | zénɡ qīnɡ
cénɡ qīnɡ | zengqing |[https://www.zdic.net/hans/曾青](https://www.zdic.net/hans/曾青)
[https://www.zysj.com.cn/zhongyaocai/cengqing](https://www.zysj.com.cn/zhongyaocai/cengqing) | 因为从两个地方查出了两种读法,所以暂时以第一种作为变量名 |
| 壳 | 栗壳 | lì ké | like | | |
| 校 | 玄校 | xuán xiào | xuanxiao |[https://www.zdic.net/hans/玄校](https://www.zdic.net/hans/玄校) | |
#### 1.1.1.2. 生僻字
因为采用了拼音,而原书中有一些生僻字,会造成一定程度的拼读困难。
这里将我认为的生僻字和读音列出,供参考。
如果颜色名有单独的词汇,则直接给出词汇读音,以此作为变量名。
其余均以字面汉字的读音来拼写变量名。
| 生僻字 | 涉及颜色名 | 拼音 | 变量名 | 参考来源 | 备注 |
| --- | --- | --- | --- | --- | --- |
| 缃 | 缃叶 | xiāng yè | xiangye | [https://www.zdic.net/hans/缃叶](https://www.zdic.net/hans/缃叶) | |
| 缊、韨 | 缊韨 | wēn fú | wenfu | [https://www.zdic.net/hans/缊韨](https://www.zdic.net/hans/缊韨) | |
| 綪、茷 | 綪茷 | qiàn fá | qianfa | [https://www.zdic.net/hans/綪茷](https://www.zdic.net/hans/綪茷) | |
| 籥 | 夏籥 | xià yuè | xiayue | [https://www.zdic.net/hans/夏籥](https://www.zdic.net/hans/夏籥) | |
| 雘 | 丹雘
青雘 | dān huò
qīng huò | danhuo
qinghuo | [https://www.zdic.net/hans/丹雘](https://www.zdic.net/hans/丹雘)
[https://www.zdic.net/hans/青雘](https://www.zdic.net/hans/青雘) | 从参考资料来看,丹雘和青雘分别读 `dān wò` 和 `qīng wò` ,但无论从别的地方查还是从单字发音一致性考虑,都把**雘**字的读音定为`huò` |
| 緺 | 青緺 | qīng guā | qinggua | [https://www.zdic.net/hans/青緺](https://www.zdic.net/hans/青緺) | |
| 赪 | 赪紫
赪霞
赪尾 | chēng zǐ
chēng xiá
chēng wěi | chengzi
chengxia
chengwei | [https://www.zdic.net/hans/赪](https://www.zdic.net/hans/赪)
[https://www.zdic.net/hans/赪霞](https://www.zdic.net/hans/赪霞)
[https://www.zdic.net/hans/赪尾](https://www.zdic.net/hans/赪尾) | 未找到“赪紫”单独成词的的例子 |
| 茈 | 茈藐 | zǐ miǎo | zimiao | [https://www.zdic.net/hans/茈](https://www.zdic.net/hans/茈) | 未找到“茈藐”单独成词的的例子 |
| 紶 | 紫紶 | zǐ qū | ziqu | [https://www.zdic.net/hans/紶](https://www.zdic.net/hans/紶) | 未找到“紫紶”单独成词的的例子 |
| 緅、絺 | 緅絺 | zōu chī | zouchi | [https://www.zdic.net/hans/緅](https://www.zdic.net/hans/緅)
[https://www.zdic.net/hans/絺](https://www.zdic.net/hans/絺) |未找到“緅絺”单独成词的的例子 |
| 罽 | 丹罽 | dān jì | danji | [https://www.zdic.net/hans/罽](https://www.zdic.net/hans/罽) | 未找到“丹罽”单独成词的的例子 |
| 芰 | 芰荷 | jì hé | jihe | [https://www.zdic.net/hans/芰荷](https://www.zdic.net/hans/芰荷) | |
| 埒 | 金埒 | jīn liè | jinlie | [https://www.zdic.net/hans/金埒](https://www.zdic.net/hans/金埒) |
| 䒌、靘 | 䒌靘 | mìng qìng | mingqing | [https://www.zdic.net/hans/䒌](https://www.zdic.net/hans/䒌)
[https://www.zdic.net/hans/靘](https://www.zdic.net/hans/靘) | 未找到“䒌靘”单独成词的的例 |
| 璆 | 璆琳 | qiú lín | qiulin | [https://www.zdic.net/hans/璆琳](https://www.zdic.net/hans/璆琳) | |
| 赩 | 赩炽 | xì chì | xichi | [https://www.zdic.net/hans/赩炽](https://www.zdic.net/hans/赩炽) | |
| 繎 | 大繎 | dà rán | danran | [https://www.zdic.net/hans/繎](https://www.zdic.net/hans/繎) | 未找到“大繎”单独成词的的例子 |
| 頩 | 玉頩 | yù pīng | yuping | [https://www.zdic.net/hans/頩](https://www.zdic.net/hans/頩) | 未找到“玉頩”单独成词的的例子 |
| 骍 | 骍刚 | xīng gāng | xinggang | [https://www.zdic.net/hans/骍刚](https://www.zdic.net/hans/骍刚) | |
| 荩、箧 | 荩箧 | jìn qiè | jinqie | [https://www.zdic.net/hans/荩箧](https://www.zdic.net/hans/荩箧) |
| 秫 | 丹秫 | dān shú | danshu | [https://www.zdic.net/hans/丹秫](https://www.zdic.net/hans/丹秫) | |
| 藘 | 茹藘 | rú lǘ | rulyu | [https://www.zdic.net/hans/茹藘](https://www.zdic.net/hans/茹藘) | |
| 饧 | 沙饧 | shā xíng | shaxing | [https://www.zdic.net/hans/沙饧](https://www.zdic.net/hans/沙饧) | |
| 麹 | 麹尘 | qū chén | quchen | [https://www.zdic.net/hans/麴塵](https://www.zdic.net/hans/麴塵) | |
| 缣 | 缣缃 | jiān xiāng | jianxiang | [https://www.zdic.net/hans/缣缃](https://www.zdic.net/hans/缣缃) | |
| 菼 | 葭菼 | jiā tǎn | jiatan | [https://www.zdic.net/hans/葭菼](https://www.zdic.net/hans/葭菼) | |
| 醽、醁 | 醽醁 | líng lù | linglu | [https://www.zdic.net/hans/醽醁](https://www.zdic.net/hans/醽醁) | |
| 翕 | 翕赩 | xī xì | xixi | [https://www.zdic.net/hans/翕赩](https://www.zdic.net/hans/翕赩) | |
| 韎、韐 | 韎韐 | mèi gé | meige | [https://www.zdic.net/hans/韎韐](https://www.zdic.net/hans/韎韐) | |
| 繱、犗 | 繱犗 | cōng jiè | congjie | [https://www.zdic.net/hans/繱](https://www.zdic.net/hans/繱)
[https://www.zdic.net/hans/犗](https://www.zdic.net/hans/犗) | 未找到“繱犗”单独成词的的例子 |
| 黪 | 黪紫
黑黪 | cǎn zǐ
hēi cǎn | canzi
heican | [https://www.zdic.net/hans/黪](https://www.zdic.net/hans/黪) | 未找到“黪紫”单独成词的的例子
未找到“黑黪”单独成词的的例子 |
| 縓 | 縓缘 | quàn yuán | quanyuan | [https://www.zdic.net/hans/縓缘](https://www.zdic.net/hans/縓缘) | |
| 鞓 | 鞓红 | tīng hóng | tinghong | [https://www.zdic.net/hans/鞓红](https://www.zdic.net/hans/鞓红) | |
| 綟 | 綟绶 | lì shòu | lishou | [https://www.zdic.net/hans/綟绶](https://www.zdic.net/hans/綟绶) | |
| 䵂 | 红䵂 | hóng zhí | hongzhi | [https://www.zdic.net/hans/䵂](https://www.zdic.net/hans/䵂) | 未找到“红䵂”单独成词的的例子 |
| 驖 | 驖骊 | tiě lí | tieli | [https://www.zdic.net/hans/驖](https://www.zdic.net/hans/驖) | 未找到“驖骊”单独成词的的例子 |
| 䌦 | 䌦色 | dǎo sè | daose | [https://www.zdic.net/hans/䌦](https://www.zdic.net/hans/䌦) | |
#### 1.1.1.3. ü
因为 **ü** 不好输入,所以采用国家标准 注1,采用 **yu** 替代 **ü** 。
即,如“绿”的 **lü** 统一替换为 **lyu** 。
**但次用法仅限于露(lu)、绿(lu)等无法区分的情况,琚(ju)等不会产生歧义的字则不做替换。**
# 2. 安装
## 2.1. 浏览器
想要直接使用 CSS ,直接导入相关的 CSS 文件即可。
```
```
要使用 JS 相关的功能,直接导入相关的 JS 文件即可。
```