diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3bf1b35..7409827 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -67,3 +67,13 @@
5. Fix lang error on mac.
6. Fix hidpi error on mac.
7. Update installation background on mac.
+
+# v2.8.5
+* Date: May 21, 2023
+* Tag: https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.5
+* Comments:
+1. Change color bars in result window when selecting assit colors.
+2. Make the color tag in wheel only selected and not moved when clicked.
+3. Make the hec text box in result window accept colors from other formats.
+4. Update freeze image method.
+5. Delete rev_direct in board and depot view.
diff --git a/README.md b/README.md
index 326addb..0ecdc2e 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ Rickrack (**R**e**a**l-t**i**me **C**olor **K**it) is a free and user-friendly c
# Table of Content
* [Introduction Translations](#introduction-translations)
-* [Feature](#feature)
+* [Features](#features)
* [Demo](#demo)
* [Basic Functions](#basic-functions)
* [Reference Colors](#reference-colors)
@@ -57,6 +57,7 @@ Rickrack (**R**e**a**l-t**i**me **C**olor **K**it) is a free and user-friendly c
* [License](#license)
* [License for Rickrack](#license-for-rickrack)
* [License for Required Packages](#license-for-required-packages)
+* [More Information](#more-information)
* [Acknowledgment](#acknowledgment)
# Introduction Translations
@@ -116,7 +117,7 @@ Rickrack es un editor de color gratuito y fácil de usar. Está diseñado para g
-# Feature
+# Features
Rickrack has several features:
* A strong and free color editor.
* Create a set of colors from the color wheel.
@@ -135,29 +136,29 @@ Rickrack has several features:
## Basic Functions
| | |
| :---: | :---: |
-| ![](demo/usage/000.gif) | ![](demo/usage/109.gif) |
+| ![](demo/00_usage/000.gif) | ![](demo/00_usage/109.gif) |
| Create a set of colors from the color wheel. | Pick-up a set of colors from an image. (Image inside: [Copyright (c) 2001 Studio Ghibli](https://www.ghibli.jp/works/chihiro/), Non-Commercial Usage) |
-| ![](demo/usage/202.gif) | ![](demo/usage/300.gif) |
+| ![](demo/00_usage/202.gif) | ![](demo/00_usage/300.gif) |
| Generate a gradient color board from the color set. | Attach the color set and color board into the depot. |
## Reference Colors
| | |
| :---: | :---: |
-| ![](demo/usage/018.gif) | ![](demo/usage/110.gif) |
+| ![](demo/00_usage/018.gif) | ![](demo/00_usage/110.gif) |
| Add reference colors in the color wheel. | Add reference colors from the image. (Image inside: [Copyright (c) 2001 Studio Ghibli](https://www.ghibli.jp/works/chihiro/), Non-Commercial Usage) |
## Color Palettes
| | |
| :---: | :---: |
-| ![](demo/usage/204.gif) | ![](demo/usage/205.gif) |
+| ![](demo/00_usage/204.gif) | ![](demo/00_usage/205.gif) |
| Convert: gradient palette ↔ fixed palette. | Convert: gradient palette ↔ reference palette. |
-| ![](demo/usage/700.gif) | ![](demo/usage/701.gif) |
+| ![](demo/00_usage/700.gif) | ![](demo/00_usage/701.gif) |
| Fixed palette: [Chinese Traditional Colors](http://zhongguose.com/). | Fixed palette: [Nippon Traditional Colors](http://nipponcolors.com/). |
## Languages and Settings
| | |
| :---: | :---: |
-| ![](demo/usage/707.gif) | ![](demo/usage/706.gif) |
+| ![](demo/00_usage/707.gif) | ![](demo/00_usage/706.gif) |
| Support multiple languages, including Chinese, English, Japanese, German, French, Russian, and so on. (Languages except Chinese and English are translated by [Google Translate](https://translate.google.cn/).) | Support multiple interface themes. |
@@ -190,7 +191,7 @@ Support the continuous development of Rickrack!
# Installation
## Current Release
-The latest preview version is [v2.7.26](https://github.com/eigenmiao/Rickrack/releases/tag/v2.7.26).
+The latest preview version is [v2.8.5](https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.5).
## Install Software
### Recommend: Install on Windows 10 or 11 via WinGet tool
@@ -199,7 +200,7 @@ winget install rickrack
```
## Install on other platforms
-Download Software from [Github](https://github.com/eigenmiao/Rickrack/releases/tag/v2.7.26) or [Sourceforge](https://sourceforge.net/projects/rickrack/files/v2.7.26/). The installation steps are presented in [tutorials](https://eigenmiao.com/2021/12/12/rickrack-tutorial-en-v2.3.4/#Installation).
+Download Software from [Github](https://github.com/eigenmiao/Rickrack/releases/tag/v2.8.5) or [Sourceforge](https://sourceforge.net/projects/rickrack/files/v2.8.5/). The installation steps are presented in [tutorials](https://eigenmiao.com/2021/12/12/rickrack-tutorial-en-v2.3.4/#Installation).
Here is a [video tutorial](https://www.bilibili.com/video/BV17r4y1L7R6/).
@@ -327,12 +328,57 @@ Rickrack default uses [Noto Serif](https://fonts.google.com/specimen/Noto+Serif)
| setuptools | 40.6.2 | MIT |
| swatch | 0.4.0 | MIT |
-# Acknowledgment
-* The Rickrack software is written in [Python](https://www.python.org/), constructed based on [PyQt5](https://www.qt.io/qt-for-python) and packed up by [fbs (free edition)](https://build-system.fman.io/).
-* The code repository is deposited on [Github](https://github.com/eigenmiao/Rickrack) and [Gitee](https://gitee.com/eigenmiao/Rickrack).
+
+
+# More Information
+* Rickrack is written in [Python](https://www.python.org/), constructed based on [PyQt5](https://www.qt.io/qt-for-python) and packed up by [fbs (free edition)](https://build-system.fman.io/).
+* The code repository of Rickrack is deposited on [Github](https://github.com/eigenmiao/Rickrack) and [Gitee](https://gitee.com/eigenmiao/Rickrack).
* The localization (l10n) and internationalization (i18n) of Rickrack is based on [Google Translate](https://translate.google.cn/) and [Microsoft Translator](https://cn.bing.com/translator), deployed on [POEditor](https://poeditor.com/join/project?hash=kBeQjfxCES).
-* The cover image is [created by martynaszulist and published on Pixabay](https://pixabay.com/zh/photos/pattern-the-palette-web-1508277/).
-* In some demonstration animations, [images of Ghibli](https://www.ghibli.jp/info/013409/) were used.
-* In the demo animations, the interface display uses the [LXGWWenKai font](https://lxgw.github.io/2021/01/28/Klee-Simpchin/).
+* The cover image uses images from [Pixabay, which is created by martynaszulist](https://pixabay.com/zh/photos/pattern-the-palette-web-1508277/).
+* In some demo animations, [images of Ghibli](https://www.ghibli.jp/info/013409/) were used.
+* The interface display in demo animations uses the [LXGWWenKai font](https://lxgw.github.io/2021/01/28/Klee-Simpchin/).
+
+
+
+# Acknowledgment
+## Publicity & Promotion
+
+
+## l10n & i18n
+
+
+## Feature Implementation & Bug Fix
+
+
+## Software Dependency
+
diff --git a/SECURITY.md b/SECURITY.md
index 2549b9f..79adbda 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -4,6 +4,7 @@ These versions of Rickrack are currently being supported with security updates.
| Version | Supported |
| --------------------- | ------------------ |
+| v2.8.5-x2d3s3-pre | :white_check_mark: |
| v2.7.26-x2d3s3-stable | :white_check_mark: |
| v2.7.25-x2d3s3-stable | :x: |
| v2.7.23-x2d3s3-pre | :x: |
diff --git a/demo/usage/000.gif b/demo/00_usage/000.gif
similarity index 100%
rename from demo/usage/000.gif
rename to demo/00_usage/000.gif
diff --git a/demo/usage/018.gif b/demo/00_usage/018.gif
similarity index 100%
rename from demo/usage/018.gif
rename to demo/00_usage/018.gif
diff --git a/demo/usage/109.gif b/demo/00_usage/109.gif
similarity index 100%
rename from demo/usage/109.gif
rename to demo/00_usage/109.gif
diff --git a/demo/usage/110.gif b/demo/00_usage/110.gif
similarity index 100%
rename from demo/usage/110.gif
rename to demo/00_usage/110.gif
diff --git a/demo/usage/202.gif b/demo/00_usage/202.gif
similarity index 100%
rename from demo/usage/202.gif
rename to demo/00_usage/202.gif
diff --git a/demo/usage/204.gif b/demo/00_usage/204.gif
similarity index 100%
rename from demo/usage/204.gif
rename to demo/00_usage/204.gif
diff --git a/demo/usage/205.gif b/demo/00_usage/205.gif
similarity index 100%
rename from demo/usage/205.gif
rename to demo/00_usage/205.gif
diff --git a/demo/usage/300.gif b/demo/00_usage/300.gif
similarity index 100%
rename from demo/usage/300.gif
rename to demo/00_usage/300.gif
diff --git a/demo/usage/700.gif b/demo/00_usage/700.gif
similarity index 100%
rename from demo/usage/700.gif
rename to demo/00_usage/700.gif
diff --git a/demo/usage/701.gif b/demo/00_usage/701.gif
similarity index 100%
rename from demo/usage/701.gif
rename to demo/00_usage/701.gif
diff --git a/demo/usage/706.gif b/demo/00_usage/706.gif
similarity index 100%
rename from demo/usage/706.gif
rename to demo/00_usage/706.gif
diff --git a/demo/usage/707.gif b/demo/00_usage/707.gif
similarity index 100%
rename from demo/usage/707.gif
rename to demo/00_usage/707.gif
diff --git a/demo/usage/800.gif b/demo/00_usage/800.gif
similarity index 100%
rename from demo/usage/800.gif
rename to demo/00_usage/800.gif
diff --git a/demo/usage/801.gif b/demo/00_usage/801.gif
similarity index 100%
rename from demo/usage/801.gif
rename to demo/00_usage/801.gif
diff --git a/demo/usage/README.md b/demo/00_usage/README.md
similarity index 96%
rename from demo/usage/README.md
rename to demo/00_usage/README.md
index e70cd92..02f5a3c 100644
--- a/demo/usage/README.md
+++ b/demo/00_usage/README.md
@@ -1,4 +1,4 @@
-![Rickrack](../src/main/icons/full/icon_full_128.png)
+![Rickrack](../../src/main/icons/full/icon_full_128.png)
[中文](https://eigenmiao.com/yanhuo/) | [English](https://eigenmiao.com/rickrack/)
diff --git a/demo/01_color_sets/README.md b/demo/01_color_sets/README.md
new file mode 100644
index 0000000..3f7c513
--- /dev/null
+++ b/demo/01_color_sets/README.md
@@ -0,0 +1,21 @@
+![Rickrack](../../src/main/icons/full/icon_full_128.png)
+
+[中文](https://eigenmiao.com/yanhuo/) | [English](https://eigenmiao.com/rickrack/)
+
+This directory contains Chinese Traditional Colors and Japanese Traditional Colors. Use [Rickrack](https://github.com/eigenmiao/Rickrack) to open or edit the color sets. This demo is published for learning and communication purpose only.
+
+Steps:
+1. Install the Rickrack software.
+
+2. Click "Import" and find this color set.
+![Import the set.](../00_usage/700.gif)
+
+Rickrack is a free software, which is distributed in the hope that it will be useful, but without any warranty. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. See the [GNU General Public License 3.0 (GPL 3.0)](https://www.gnu.org/licenses/) for more details.
+
+All images, documents and translations in Rickrack [code repository](https://github.com/eigenmiao/Rickrack) are licensed under [Creative Commons Attribution-NonCommercial-ShareAlike License 4.0 (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/) unless stating additionally.
+
+Rickrack default uses [Noto Serif](https://fonts.google.com/specimen/Noto+Serif) ([SC](https://fonts.google.com/specimen/Noto+Serif+SC)) fonts and [Noto Sans](https://fonts.google.com/specimen/Noto+Sans) ([SC](https://fonts.google.com/specimen/Noto+Sans+SC)) fonts for interface display, which are designed by Google and published in website [Google Fonts](https://fonts.google.com/). These fonts are open-sourced under [Apache 2.0](http://www.apache.org/licenses/) and [SIL Open Font License 1.1](http://scripts.sil.org/OFL), respectively.
+
+Please visit https://github.com/eigenmiao/Rickrack for more infomation about Rickrack.
+
+Copyright (c) 2019-2023 by Eigenmiao. All Rights Reserved.
diff --git a/demo/01_color_sets/chinese_colors.dps b/demo/01_color_sets/chinese_colors.dps
new file mode 100644
index 0000000..4a47f69
--- /dev/null
+++ b/demo/01_color_sets/chinese_colors.dps
@@ -0,0 +1,1092 @@
+{
+ "version": "v2.7.23-x2d3s3-pre",
+ "site": "https://eigenmiao.github.io/yanhuo/",
+ "type": "set",
+ "palettes": [
+ {
+ "rule": "custom",
+ "name": "中国传统色",
+ "desc": "此文件包含中国传统色,文件中的色彩来源于网站 http://zhongguose.com/。",
+ "time": [
+ 0.0,
+ 0.0
+ ],
+ "color_2": {
+ "hex_code": "5c2223"
+ },
+ "color_1": {
+ "hex_code": "eea2a4"
+ },
+ "color_0": {
+ "hex_code": "5a191b"
+ },
+ "color_3": {
+ "hex_code": "f07c82"
+ },
+ "color_4": {
+ "hex_code": "5a1216"
+ },
+ "grid_list": [
+ [
+ "5c2223",
+ "eea2a4",
+ "5a191b",
+ "f07c82",
+ "5a1216",
+ "ed5a65",
+ "c04851",
+ "ee3f4d",
+ "c02c38",
+ "a7535a",
+ "e3b4b8",
+ "f0a1a8",
+ "f1939c",
+ "a61b29",
+ "894e54",
+ "c45a65",
+ "d11a2d",
+ "c21f30",
+ "de1c31",
+ "7c1823",
+ "541e24",
+ "4c1f24",
+ "82202b",
+ "82111f",
+ "ef475d",
+ "4d1018",
+ "ed556a",
+ "7a7374",
+ "f03752",
+ "e6d2d5",
+ "f0c9cf",
+ "ee2746",
+ "2b1216",
+ "ee4863",
+ "e77c8e",
+ "500a16",
+ "c27c88",
+ "73575c",
+ "ee4866",
+ "621624",
+ "ce5777",
+ "cc163a",
+ "f1c4cd",
+ "eeb8c3",
+ "856d72",
+ "2d0c13",
+ "36282b",
+ "bf3553",
+ "ec9bad",
+ "63071c",
+ "30161c",
+ "eea6b7",
+ "e9ccd3",
+ "eba0b3",
+ "4f383e",
+ "ed9db2",
+ "ec8aa4",
+ "ec7696",
+ "ea7293",
+ "ef82a0",
+ "ec2c64",
+ "eb507e",
+ "eb3c70",
+ "ea517f",
+ "de7897",
+ "b598a1",
+ "ed2f6a",
+ "c5708b",
+ "33141e",
+ "621d34",
+ "ef3473",
+ "382129",
+ "310f1b",
+ "381924",
+ "e16c96",
+ "951c48",
+ "62102e",
+ "e0c8d1",
+ "d13c74",
+ "4b1e2f",
+ "ec4e8a",
+ "de3f7c",
+ "a8456b",
+ "ce5e8a",
+ "461629",
+ "ee2c79",
+ "ef498b",
+ "ede3e7",
+ "ec2d7a",
+ "482936",
+ "440e25",
+ "d2568c",
+ "e9d7df",
+ "d2357d",
+ "36292f",
+ "d276a3",
+ "c06f98",
+ "cc5595",
+ "c35691",
+ "ba2f7b",
+ "9b1e64",
+ "5d3f51",
+ "4e2a40",
+ "bc84a8",
+ "c08eaf",
+ "411c35",
+ "ad6598",
+ "a35c8f",
+ "681752",
+ "894276",
+ "7e2065",
+ "8b2671",
+ "983680",
+ "c8adc4",
+ "1c0d1a",
+ "7e1671",
+ "1e131d",
+ "813c85",
+ "d1c2d3",
+ "3e3841",
+ "815c94",
+ "806d9e",
+ "e2e1e4",
+ "322f3b",
+ "8076a3",
+ "35333c",
+ "22202e",
+ "131124",
+ "302f4b",
+ "525288",
+ "2f2f35",
+ "ccccd6",
+ "74759b",
+ "1f2040",
+ "2e317c",
+ "a7a8bd",
+ "61649f",
+ "2d2e36",
+ "5e616d",
+ "47484c",
+ "0f1423",
+ "131824",
+ "475164",
+ "2b333e",
+ "1c2938",
+ "101f30",
+ "142334",
+ "15559a",
+ "0f59a4",
+ "1661ab",
+ "3170a7",
+ "346c9c",
+ "2775b6",
+ "2b73af",
+ "2474b5",
+ "4e7ca1",
+ "2376b7",
+ "144a74",
+ "93b5cf",
+ "2177b8",
+ "126bae",
+ "1772b4",
+ "baccd9",
+ "619ac3",
+ "495c69",
+ "8fb2c9",
+ "5698c3",
+ "11659a",
+ "2983bb",
+ "1677b3",
+ "c4cbcf",
+ "1177b0",
+ "2486b9",
+ "5e7987",
+ "74787a",
+ "cdd1d3",
+ "1781b5",
+ "66a9c9",
+ "d0dfe6",
+ "2f90b9",
+ "8abcd1",
+ "c3d7df",
+ "158bb8",
+ "d8e3e7",
+ "b2bbbe",
+ "1a94bc",
+ "5cb3cc",
+ "134857",
+ "132c33",
+ "21373d",
+ "b0d5df",
+ "22a2c3",
+ "474b4c",
+ "63bbd0",
+ "126e82",
+ "0f95b0",
+ "1491a8",
+ "c7d2d4",
+ "1e9eb3",
+ "3b818c",
+ "0eb0c9",
+ "29b7cb",
+ "51c4d3",
+ "7cabb1",
+ "10aec2",
+ "648e93",
+ "93d5dc",
+ "617172",
+ "c6e6e8",
+ "869d9d",
+ "57c3c2",
+ "c4d7d6",
+ "12aa9c",
+ "737c7b",
+ "12a182",
+ "1ba784",
+ "428675",
+ "c0c4c3",
+ "248067",
+ "1a3b32",
+ "314a43",
+ "2c9678",
+ "223e36",
+ "497568",
+ "141e1b",
+ "69a794",
+ "2bae85",
+ "9abeaf",
+ "45b787",
+ "92b3a5",
+ "1f2623",
+ "83cbac",
+ "70887d",
+ "55bb8a",
+ "20a162",
+ "40a070",
+ "1a6840",
+ "61ac85",
+ "68b88e",
+ "a4cab6",
+ "3c9566",
+ "5dbe8a",
+ "207f4c",
+ "eef7f2",
+ "579572",
+ "b9dec9",
+ "229453",
+ "20894d",
+ "15231b",
+ "66c18c",
+ "a4aca7",
+ "8a988e",
+ "9eccab",
+ "83a78d",
+ "485b4d",
+ "5d655f",
+ "6e8b74",
+ "2b312c",
+ "c6dfc8",
+ "41b349",
+ "43b244",
+ "253d24",
+ "41ae3c",
+ "add5a2",
+ "5e665b",
+ "8cc269",
+ "5bae23",
+ "dfecd5",
+ "cad3c3",
+ "9fa39a",
+ "b2cf87",
+ "96c24e",
+ "f0f5e5",
+ "b7d07a",
+ "d0deaa",
+ "373834",
+ "bacf65",
+ "e2e7bf",
+ "bec936",
+ "d2d97a",
+ "e2d849",
+ "fffef8",
+ "5e5314",
+ "fffef9",
+ "ad9e5f",
+ "fed71a",
+ "f9f4dc",
+ "e4bf11",
+ "d2b116",
+ "fbda41",
+ "eed045",
+ "f1ca17",
+ "d2b42c",
+ "f2ce2b",
+ "e2c027",
+ "645822",
+ "fcd217",
+ "f8df70",
+ "dfc243",
+ "f8df72",
+ "ffd111",
+ "ddc871",
+ "fffefa",
+ "867018",
+ "887322",
+ "fcd337",
+ "8e804b",
+ "fecc11",
+ "fccb16",
+ "ffc90c",
+ "b7ae8f",
+ "f8d86a",
+ "fbcd31",
+ "fcc307",
+ "e9ddb6",
+ "fcc515",
+ "f7e8aa",
+ "e8b004",
+ "f9c116",
+ "f9d770",
+ "fbc82f",
+ "f1f0ed",
+ "5b4913",
+ "f6c430",
+ "b78d12",
+ "f9bd10",
+ "f9d367",
+ "d9a40e",
+ "ebb10d",
+ "584717",
+ "f7de98",
+ "f9f1db",
+ "f4ce69",
+ "feba07",
+ "8a6913",
+ "876818",
+ "b6a476",
+ "fcb70a",
+ "f0d695",
+ "87723e",
+ "f8e8c1",
+ "d6a01d",
+ "f7da94",
+ "eaad1a",
+ "fbb612",
+ "b5aa90",
+ "f7f4ed",
+ "f8bc31",
+ "b78b26",
+ "e5d3aa",
+ "695e45",
+ "e5b751",
+ "f3bf4c",
+ "685e48",
+ "fbb929",
+ "f9d27d",
+ "e2c17c",
+ "b4a992",
+ "f6dead",
+ "f2e6ce",
+ "f8e0b0",
+ "393733",
+ "835e1d",
+ "f8f4ed",
+ "fca104",
+ "815f25",
+ "fca106",
+ "ffa60f",
+ "806332",
+ "fbf2e3",
+ "fba414",
+ "e4dfd7",
+ "826b48",
+ "dad4cb",
+ "bbb5ac",
+ "bbb5ac",
+ "ff9900",
+ "fbb957",
+ "dc9123",
+ "c09351",
+ "f4a83a",
+ "f7c173",
+ "e7a23f",
+ "533c1b",
+ "f9e8d0",
+ "de9e44",
+ "f9cb8b",
+ "f9a633",
+ "daa45a",
+ "553b18",
+ "513c20",
+ "986524",
+ "97846c",
+ "e3bd8d",
+ "4d4030",
+ "fb8b05",
+ "f8c387",
+ "f28e16",
+ "503e2a",
+ "4a4035",
+ "cfccc9",
+ "c1b2a3",
+ "867e76",
+ "847c74",
+ "fc8c23",
+ "fbecde",
+ "4f4032",
+ "fbeee2",
+ "81776e",
+ "9a8878",
+ "5d3d21",
+ "66462a",
+ "918072",
+ "d99156",
+ "c1651a",
+ "d4c4b7",
+ "be7e4a",
+ "5c3719",
+ "de7622",
+ "db8540",
+ "80766e",
+ "f09c5a",
+ "f97d1c",
+ "f26b1f",
+ "f8b37f",
+ "fa7e23",
+ "f9e9cd",
+ "b7a091",
+ "945833",
+ "f0945d",
+ "964d22",
+ "954416",
+ "e16723",
+ "fc7930",
+ "cf7543",
+ "f86b1d",
+ "cd6227",
+ "f6dcce",
+ "d85916",
+ "f7cfba",
+ "f27635",
+ "e46828",
+ "fc6315",
+ "b7511d",
+ "ea8958",
+ "e8b49a",
+ "fb9968",
+ "edc3ae",
+ "363433",
+ "8b614d",
+ "aa6a4c",
+ "a6522c",
+ "fa5d19",
+ "71361d",
+ "b89485",
+ "f68c60",
+ "f6ad8f",
+ "732e12",
+ "f7cdbc",
+ "ef632b",
+ "8c4b31",
+ "64483d",
+ "f9723d",
+ "cf4813",
+ "ee8055",
+ "f8ebe6",
+ "753117",
+ "603d30",
+ "883a1e",
+ "b14b28",
+ "873d24",
+ "f6cec1",
+ "5b423a",
+ "624941",
+ "673424",
+ "f43e06",
+ "ef6f48",
+ "f4c7ba",
+ "ed5126",
+ "f34718",
+ "f2481b",
+ "652b1c",
+ "eea08c",
+ "f04b22",
+ "692a1b",
+ "f1441d",
+ "773d31",
+ "eeaa9c",
+ "f0ada0",
+ "863020",
+ "f2e7e5",
+ "862617",
+ "f5391c",
+ "f03f24",
+ "f33b1f",
+ "f23e23",
+ "f13c22",
+ "f05a46",
+ "f17666",
+ "f15642",
+ "f25a47",
+ "f2b9b2",
+ "592620",
+ "de2a18",
+ "ed3321",
+ "f04a3a",
+ "482522",
+ "5c1e19",
+ "d42517",
+ "f19790",
+ "ab372f",
+ "5a1f1b",
+ "ed3b2f",
+ "bdaead",
+ "eb261a",
+ "ac1f18",
+ "483332",
+ "481e1c",
+ "f1908c",
+ "ec2b24",
+ "efafad",
+ "f2cac9",
+ "4b2e2b",
+ "ed4845",
+ "ed3333",
+ "5d3131"
+ ],
+ [
+ "暗玉紫(anyuzi)",
+ "牡丹粉红(mudanfenhong)",
+ "栗紫(lizi)",
+ "香叶红(xiangyehong)",
+ "葡萄酱紫(putaojiangzi)",
+ "艳红(yanhong)",
+ "玉红(yuhong)",
+ "茶花红(chahuahong)",
+ "高粱红(gaolianghong)",
+ "满江红(manjianghong)",
+ "鼠鼻红(shubihong)",
+ "合欢红(hehuanhong)",
+ "春梅红(chunmeihong)",
+ "苋菜红(xiancaihong)",
+ "烟红(yanhong)",
+ "莓红(meihong)",
+ "鹅冠红(eguanhong)",
+ "枫叶红(fengyehong)",
+ "唐菖蒲红(tangchangpuhong)",
+ "枣红(zaohong)",
+ "猪肝紫(zhuganzi)",
+ "葡萄紫(putaozi)",
+ "暗紫苑红(anziyuanhong)",
+ "殷红(yanhong)",
+ "草茉莉红(caomolihong)",
+ "酱紫(jiangzi)",
+ "山茶红(shanchahong)",
+ "锌灰(xinhui)",
+ "海棠红(haitanghong)",
+ "蓟粉红(jifenhong)",
+ "石蕊红(shiruihong)",
+ "淡曙红(danshuhong)",
+ "李紫(lizi)",
+ "石竹红(shizhuhong)",
+ "淡茜红(danqianhong)",
+ "金鱼紫(jinyuzi)",
+ "山黎豆红(shanlidouhong)",
+ "鼠背灰(shubeihui)",
+ "淡蕊香红(danruixianghong)",
+ "甘蔗紫(ganzhezi)",
+ "月季红(yuejihong)",
+ "尖晶玉红(jianjingyuhong)",
+ "水红(shuihong)",
+ "姜红(jianghong)",
+ "芦灰(luhui)",
+ "茄皮紫(qiepizi)",
+ "苍蝇灰(cangyinghui)",
+ "锦葵红(jinkuihong)",
+ "粉团花红(fentuanhuahong)",
+ "石竹紫(shizhuzi)",
+ "卵石紫(luanshizi)",
+ "晶红(jinghong)",
+ "芝兰紫(zhilanzi)",
+ "芍药耕红(shaoyaogenghong)",
+ "暮云灰(muyunhui)",
+ "豇豆红(jiangdouhong)",
+ "报春红(baochunhong)",
+ "淡绛红(danjianghong)",
+ "凤仙花红(fengxianhuahong)",
+ "霞光红(xiaguanghong)",
+ "喜蛋红(xidanhong)",
+ "夹竹桃红(jiazhutaohong)",
+ "松叶牡丹红(songyemudanhong)",
+ "莲瓣红(lianbanhong)",
+ "白芨红(baijihong)",
+ "隐红灰(yinhonghui)",
+ "榲桲红(wenpohong)",
+ "酢酱草红(cujiangcaohong)",
+ "火鹅紫(huoezi)",
+ "鹞冠紫(yaoguanzi)",
+ "品红(pinhong)",
+ "磨石紫(moshizi)",
+ "墨紫(mozi)",
+ "檀紫(tanzi)",
+ "初荷红(chuhehong)",
+ "菜头紫(caitouzi)",
+ "葡萄酒红(putaojiuhong)",
+ "淡青紫(danqingzi)",
+ "菠根红(bogenhong)",
+ "海象紫(haixiangzi)",
+ "兔眼红(tuyanhong)",
+ "嫩菱红(nenlinghong)",
+ "洋葱紫(yangcongzi)",
+ "吊钟花红(diaozhonghuahong)",
+ "绀紫(ganzi)",
+ "紫荆红(zijinghong)",
+ "扁豆花红(biandouhuahong)",
+ "马鞭草紫(mabiancaozi)",
+ "藏花红(canghuahong)",
+ "斑鸠灰(banjiuhui)",
+ "古铜紫(gutongzi)",
+ "丹紫红(danzihong)",
+ "丁香淡紫(dingxiangdanzi)",
+ "玫瑰红(meiguihong)",
+ "古鼎灰(gudinghui)",
+ "菱锰红(lingmenghong)",
+ "樱草紫(yingcaozi)",
+ "龙须红(longxuhong)",
+ "电气石红(dianqishihong)",
+ "玫瑰紫(meiguizi)",
+ "苋菜紫(xiancaizi)",
+ "紫灰(zihui)",
+ "龙睛鱼紫(longjingyuzi)",
+ "青蛤壳紫(qinghakezi)",
+ "萝兰紫(luolanzi)",
+ "荸荠紫(biqizi)",
+ "豆蔻紫(doukouzi)",
+ "扁豆紫(biandouzi)",
+ "牵牛紫(qianniuzi)",
+ "芓紫(zizi)",
+ "葛巾紫(gejinzi)",
+ "青莲(qinglian)",
+ "芥花紫(jiehuazi)",
+ "凤信紫(fengxinzi)",
+ "深牵牛紫(shenqianniuzi)",
+ "魏紫(weizi)",
+ "乌梅紫(wumeizi)",
+ "桔梗紫(jiegengzi)",
+ "淡牵牛紫(danqianniuzi)",
+ "剑锋紫(jianfengzi)",
+ "蕈紫(xunzi)",
+ "槿紫(jinzi)",
+ "芡食白(qianshibai)",
+ "龙葵紫(longkuizi)",
+ "藤萝紫(tengluozi)",
+ "沙鱼灰(shayuhui)",
+ "暗龙胆紫(anlongdanzi)",
+ "暗蓝紫(anlanzi)",
+ "野葡萄紫(yeputaozi)",
+ "野菊紫(yejuzi)",
+ "水牛灰(shuiniuhui)",
+ "远山紫(yuanshanzi)",
+ "螺甸紫(luodianzi)",
+ "晶石紫(jingshizi)",
+ "满天星紫(mantianxingzi)",
+ "淡蓝紫(danlanzi)",
+ "山梗紫(shangengzi)",
+ "牛角灰(niujiaohui)",
+ "鱼尾灰(yuweihui)",
+ "瓦罐灰(waguanhui)",
+ "钢蓝(ganglan)",
+ "燕颔蓝(yanhanlan)",
+ "鲸鱼灰(jingyuhui)",
+ "青灰(qinghui)",
+ "鸽蓝(gelan)",
+ "暗蓝(anlan)",
+ "钢青(gangqing)",
+ "海涛蓝(haitaolan)",
+ "飞燕草蓝(feiyancaolan)",
+ "靛青(dianqing)",
+ "安安蓝(ananlan)",
+ "海军蓝(haijunlan)",
+ "景泰蓝(jingtailan)",
+ "品蓝(pinlan)",
+ "尼罗蓝(niluolan)",
+ "蝶翅蓝(diechilan)",
+ "花青(huaqing)",
+ "鷃蓝(yanlan)",
+ "星蓝(xinglan)",
+ "虹蓝(honglan)",
+ "柏林蓝(bolinlan)",
+ "群青(qunqing)",
+ "云水蓝(yunshuilan)",
+ "羽扇豆蓝(yushandoulan)",
+ "战舰灰(zhanjianhui)",
+ "晴山蓝(qingshanlan)",
+ "睛蓝(jinglan)",
+ "搪磁蓝(tangcilan)",
+ "潮蓝(chaolan)",
+ "天蓝(tianlan)",
+ "大理石灰(dalishihui)",
+ "牵牛花蓝(qianniuhualan)",
+ "宝石蓝(baoshilan)",
+ "淡蓝灰(danlanhui)",
+ "嫩灰(nenhui)",
+ "银鱼白(yinyubai)",
+ "釉蓝(youlan)",
+ "涧石蓝(jianshilan)",
+ "远天蓝(yuantianlan)",
+ "云山蓝(yunshanlan)",
+ "秋波蓝(qiubolan)",
+ "井天蓝(jingtianlan)",
+ "鸢尾蓝(yuanweilan)",
+ "云峰白(yunfengbai)",
+ "星灰(xinghui)",
+ "钴蓝(gulan)",
+ "碧青(biqing)",
+ "苍蓝(canglan)",
+ "深灰蓝(shenhuilan)",
+ "灰蓝(huilan)",
+ "湖水蓝(hushuilan)",
+ "海青(haiqing)",
+ "黄昏灰(huanghunhui)",
+ "霁青(jiqing)",
+ "玉鈫蓝(yuqinlan)",
+ "胆矾蓝(danfanlan)",
+ "樫鸟蓝(jianniaolan)",
+ "鸥蓝(oulan)",
+ "翠蓝(cuilan)",
+ "蜻蜓蓝(qingtinglan)",
+ "孔雀蓝(kongquelan)",
+ "蔚蓝(weilan)",
+ "瀑布蓝(pubulan)",
+ "闪蓝(shanlan)",
+ "甸子蓝(dianzilan)",
+ "晚波蓝(wanbolan)",
+ "清水蓝(qingshuilan)",
+ "夏云灰(xiayunhui)",
+ "海天蓝(haitianlan)",
+ "虾壳青(xiakeqing)",
+ "石绿(shilv)",
+ "穹灰(qionghui)",
+ "美蝶绿(meidielv)",
+ "垩灰(ehui)",
+ "蓝绿(lanlv)",
+ "竹绿(zhulv)",
+ "亚丁绿(yadinglv)",
+ "月影白(yueyingbai)",
+ "海王绿(haiwanglv)",
+ "深海绿(shenhailv)",
+ "绿灰(lvhui)",
+ "青矾绿(qingfanlv)",
+ "苍绿(canglv)",
+ "飞泉绿(feiquanlv)",
+ "莽丛绿(mangconglv)",
+ "梧枝绿(wuzhilv)",
+ "铜绿(tonglv)",
+ "草原远绿(caoyuanyuanlv)",
+ "蛙绿(walv)",
+ "浪花绿(langhualv)",
+ "苷蓝绿(ganlanlv)",
+ "粉绿(fenlv)",
+ "淡绿灰(danlvhui)",
+ "麦苗绿(maimiaolv)",
+ "翠绿(cuilv)",
+ "葱绿(conglv)",
+ "荷叶绿(heyelv)",
+ "淡绿(danlv)",
+ "田园绿(tianyuanlv)",
+ "玉簪绿(yuzanlv)",
+ "蟾绿(chanlv)",
+ "蔻梢绿(koushaolv)",
+ "薄荷绿(bohelv)",
+ "月白(yuebai)",
+ "蛋白石绿(danbaishilv)",
+ "竹篁绿(zhuhuanglv)",
+ "孔雀绿(kongquelv)",
+ "宫殿绿(gongdianlv)",
+ "云杉绿(yunshanlv)",
+ "毛绿(maolv)",
+ "冰山蓝(bingshanlan)",
+ "明灰(minghui)",
+ "明绿(minglv)",
+ "松霜绿(songshuanglv)",
+ "白屈菜绿(baiqucailv)",
+ "狼烟灰(langyanhui)",
+ "瓦松绿(wasonglv)",
+ "槲寄生绿(hujishenglv)",
+ "淡翠绿(dancuilv)",
+ "玉髓绿(yusuilv)",
+ "鲜绿(xianlv)",
+ "油绿(youlv)",
+ "宝石绿(baoshilv)",
+ "嘉陵水绿(jialingshuilv)",
+ "田螺绿(tianluolv)",
+ "水绿(shuilv)",
+ "鹦鹉绿(yingwulv)",
+ "艾背绿(aibeilv)",
+ "艾绿(ailv)",
+ "镍灰(niehui)",
+ "橄榄石绿(ganlanshilv)",
+ "芽绿(yalv)",
+ "嫩菊绿(nenjulv)",
+ "芦苇绿(luweilv)",
+ "姚黄(yaohuang)",
+ "蒽油绿(enyoulv)",
+ "苹果绿(pingguolv)",
+ "海沬绿(haimeilv)",
+ "橄榄黄绿(ganlanhuanglv)",
+ "槐花黄绿(huaihuahuanglv)",
+ "蝶黄(diehuang)",
+ "象牙白(xiangyabai)",
+ "橄榄绿(ganlanlv)",
+ "雪白(xuebai)",
+ "淡灰绿(danhuilv)",
+ "佛手黄(foshouhuang)",
+ "乳白(rubai)",
+ "香蕉黄(xiangjiaohuang)",
+ "新禾绿(xinhelv)",
+ "油菜花黄(youcaihuahuang)",
+ "秋葵黄(qiukuihuang)",
+ "柚黄(youhuang)",
+ "草黄(caohuang)",
+ "硫华黄(liuhuahuang)",
+ "姜黄(jianghuang)",
+ "潭水绿(tanshuilv)",
+ "金瓜黄(jinguahuang)",
+ "麦秆黄(maiganhuang)",
+ "蒿黄(haohuang)",
+ "茉莉黄(molihuang)",
+ "藤黄(tenghuang)",
+ "芒果黄(mangguohuang)",
+ "海参灰(haishenhui)",
+ "碧螺春绿(biluochunlv)",
+ "苔绿(tailv)",
+ "柠檬黄(ningmenghuang)",
+ "草灰绿(caohuilv)",
+ "向日葵黄(xiangrikuihuang)",
+ "素馨黄(suxinhuang)",
+ "乳鸭黄(ruyahuang)",
+ "月灰(yuehui)",
+ "葵扇黄(kuishanhuang)",
+ "大豆黄(dadouhuang)",
+ "金盏黄(jinzhanhuang)",
+ "菊蕾白(juleibai)",
+ "黄连黄(huanglianhuang)",
+ "杏仁黄(xingrenhuang)",
+ "谷黄(guhuang)",
+ "木瓜黄(muguahuang)",
+ "淡茧黄(danjianhuang)",
+ "雅梨黄(yalihuang)",
+ "银白(yinbai)",
+ "棕榈绿(zonglvlv)",
+ "鹦鹉冠黄(yingwuguanhuang)",
+ "枯绿(kulv)",
+ "浅烙黄(qianlaohuang)",
+ "淡密黄(danmihuang)",
+ "芥黄(jiehuang)",
+ "栀子黄(zhizihuang)",
+ "暗海水绿(anhaishuilv)",
+ "篾黄(miehuang)",
+ "蚌肉白(bangroubai)",
+ "炒米黄(chaomihuang)",
+ "琥珀黄(hupohuang)",
+ "灰绿(huilv)",
+ "粽叶绿(zongyelv)",
+ "尘灰(chenhui)",
+ "鼬黄(youhuang)",
+ "象牙黄(xiangyahuang)",
+ "鲛青(jiaoqing)",
+ "豆汁黄(douzhihuang)",
+ "土黄(tuhuang)",
+ "香水玫瑰黄(xiangshuimeiguihuang)",
+ "虎皮黄(hupihuang)",
+ "鸡蛋黄(jidanhuang)",
+ "银鼠灰(yinshuhui)",
+ "鱼肚白(yudubai)",
+ "初熟杏黄(chushuxinghuang)",
+ "山鸡黄(shanjihuang)",
+ "莲子白(lianzibai)",
+ "蟹壳灰(xiekehui)",
+ "沙石黄(shashihuang)",
+ "甘草黄(gancaohuang)",
+ "燕羽灰(yanyuhui)",
+ "鹅掌黄(ezhanghuang)",
+ "麦芽糖黄(maiyatanghuang)",
+ "浅驼色(qiantuose)",
+ "百灵鸟灰(bailingniaohui)",
+ "酪黄(laohuang)",
+ "荔肉白(liroubai)",
+ "淡肉色(danrouse)",
+ "河豚灰(hetunhui)",
+ "蜴蜊绿(yililv)",
+ "汉白玉(hanbaiyu)",
+ "橙皮黄(chengpihuang)",
+ "莱阳梨黄(laiyanglihuang)",
+ "枇杷黄(pipahuang)",
+ "金叶黄(jinyehuang)",
+ "苍黄(canghuang)",
+ "粉白(fenbai)",
+ "淡橘橙(danjucheng)",
+ "珍珠灰(zhenzhuhui)",
+ "龟背黄(guibeihuang)",
+ "浅灰(qianhui)",
+ "铅灰(qianhui)",
+ "中灰(zhonghui)",
+ "雄黄(xionghuang)",
+ "蜜黄(mihuang)",
+ "风帆黄(fengfanhuang)",
+ "桂皮淡棕(guipidanzong)",
+ "金莺黄(jinyinghuang)",
+ "肉色(rouse)",
+ "凋叶棕(diaoyezong)",
+ "古铜绿(gutonglv)",
+ "落英淡粉(luoyingdanfen)",
+ "软木黄(ruanmuhuang)",
+ "瓜瓤粉(guarangfen)",
+ "榴萼黄(liuehuang)",
+ "玳瑁黄(daimaohuang)",
+ "焦茶绿(jiaochalv)",
+ "蟹壳绿(xiekelv)",
+ "山鸡褐(shanjihe)",
+ "猴毛灰(houmaohui)",
+ "鹿角棕(lujiaozong)",
+ "淡松烟(dansongyan)",
+ "万寿菊黄(wanshoujuhuang)",
+ "蛋壳黄(dankehuang)",
+ "杏黄(xinghuang)",
+ "橄榄灰(ganlanhui)",
+ "鹤灰(hehui)",
+ "玛瑙灰(manaohui)",
+ "淡银灰(danyinhui)",
+ "瓦灰(wahui)",
+ "夜灰(yehui)",
+ "北瓜黄(beiguahuang)",
+ "荷花白(hehuabai)",
+ "松鼠灰(songshuhui)",
+ "淡米粉(danmifen)",
+ "深灰(shenhui)",
+ "海鸥灰(haiouhui)",
+ "茶褐(chahe)",
+ "驼色(tuose)",
+ "银灰(yinhui)",
+ "鹿皮褐(lupihe)",
+ "槟榔综(binglangzong)",
+ "晓灰(xiaohui)",
+ "淡赭(danzhe)",
+ "古铜褐(gutonghe)",
+ "麂棕(jizong)",
+ "醉瓜肉(zuiguarou)",
+ "雁灰(yanhui)",
+ "鲑鱼红(guiyuhong)",
+ "橘橙(jucheng)",
+ "金黄(jinhuang)",
+ "玫瑰粉(meiguifen)",
+ "美人焦橙(meirenjiaocheng)",
+ "米色(mise)",
+ "蛛网灰(zhuwanghui)",
+ "淡咖啡(dankafei)",
+ "海螺橙(hailuocheng)",
+ "岩石棕(yanshizong)",
+ "芒果棕(mangguozong)",
+ "陶瓷红(taocihong)",
+ "菠萝红(boluohong)",
+ "余烬红(yujinhong)",
+ "金莲花橙(jinlianhuacheng)",
+ "火砖红(huozhuanhong)",
+ "初桃粉红(chutaofenhong)",
+ "铁棕(tiezong)",
+ "介壳淡粉红(jieqiaodanfenhong)",
+ "蟹壳红(xiekehong)",
+ "金驼(jintuo)",
+ "燕颔红(yanhanhong)",
+ "淡可可棕(dankekezong)",
+ "晨曦红(chenxihong)",
+ "玉粉红(yufenhong)",
+ "野蔷薇红(yeqiangweihong)",
+ "藕荷(ouhe)",
+ "长石灰(changshihui)",
+ "中红灰(zhonghonghui)",
+ "火泥棕(huonizong)",
+ "绀红(ganhong)",
+ "莓酱红(meijianghong)",
+ "丁香棕(dingxiangzong)",
+ "淡玫瑰灰(danmeiguihui)",
+ "瓜瓤红(guaranghong)",
+ "淡藏花红(dancanghuahong)",
+ "筍皮棕(sunpizong)",
+ "润红(runhong)",
+ "龙睛鱼红(longjingyuhong)",
+ "淡土黄(dantuhuang)",
+ "珠母灰(zhumuhui)",
+ "芙蓉红(furonghong)",
+ "落霞红(luoxiahong)",
+ "法螺红(faluohong)",
+ "草珠红(caozhuhong)",
+ "咖啡(kafei)",
+ "中灰驼(zhonghuituo)",
+ "椰壳棕(yekezong)",
+ "蟹蝥红(xiemaohong)",
+ "淡豆沙(dandousha)",
+ "淡桃红(dantaohong)",
+ "淡铁灰(dantiehui)",
+ "石板灰(shibanhui)",
+ "淡栗棕(danlizong)",
+ "银朱(yinzhu)",
+ "草莓红(caomeihong)",
+ "洋水仙红(yangshuixianhong)",
+ "朱红(zhuhong)",
+ "榴花红(liuhuahong)",
+ "柿红(shihong)",
+ "可可棕(kekezong)",
+ "淡罂粟红(danyingsuhong)",
+ "大红(dahong)",
+ "柞叶棕(zhayezong)",
+ "蜻蜓红(qingtinghong)",
+ "橡树棕(xiangshuzong)",
+ "颊红(jiahong)",
+ "桃红(taohong)",
+ "火岩棕(huoyanzong)",
+ "淡藤萝紫(dantengluozi)",
+ "赭石(zheshi)",
+ "铁水红(tieshuihong)",
+ "胭脂红(yanzhihong)",
+ "极光红(jiguanghong)",
+ "红汞红(honggonghong)",
+ "萝卜红(luobohong)",
+ "曲红(quhong)",
+ "谷鞘红(guqiaohong)",
+ "苹果红(pingguohong)",
+ "桂红(guihong)",
+ "粉红(fenhong)",
+ "暗驼棕(antuozong)",
+ "夕阳红(xiyanghong)",
+ "樱桃红(yingtaohong)",
+ "珊瑚红(shanhuhong)",
+ "火山棕(huoshanzong)",
+ "栗棕(lizong)",
+ "鹤顶红(hedinghong)",
+ "舌红(shehong)",
+ "鹅血石红(exueshihong)",
+ "酱棕(jiangzong)",
+ "鱼鳃红(yusaihong)",
+ "芦穗灰(lusuihui)",
+ "丽春红(lichunhong)",
+ "覆盆子红(fupenzihong)",
+ "海报灰(haibaohui)",
+ "豆沙(dousha)",
+ "榴子红(liuzihong)",
+ "秋海棠红(qiuhaitanghong)",
+ "无花果红(wuhuaguohong)",
+ "淡绯(danfei)",
+ "玫瑰灰(meiguihui)",
+ "淡菽红(danshuhong)",
+ "枸枢红(goushuhong)",
+ "貂紫(diaozi)"
+ ]
+ ],
+ "grid_values": {
+ "col": 23.0
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/demo/01_color_sets/nippon_colors.dps b/demo/01_color_sets/nippon_colors.dps
new file mode 100644
index 0000000..104334f
--- /dev/null
+++ b/demo/01_color_sets/nippon_colors.dps
@@ -0,0 +1,540 @@
+{
+ "version": "v2.7.23-x2d3s3-pre",
+ "site": "https://eigenmiao.github.io/yanhuo/",
+ "type": "set",
+ "palettes": [
+ {
+ "rule": "custom",
+ "name": "日本传统色",
+ "desc": "此文件包含日本传统色,文件中的色彩来源于网站 https://nipponcolors.com/。",
+ "time": [
+ 0.0,
+ 0.0
+ ],
+ "color_2": {
+ "hex_code": "DC9FB4"
+ },
+ "color_1": {
+ "hex_code": "E16B8C"
+ },
+ "color_0": {
+ "hex_code": "8E354A"
+ },
+ "color_3": {
+ "hex_code": "F8C3CD"
+ },
+ "color_4": {
+ "hex_code": "F4A7B9"
+ },
+ "grid_list": [
+ [
+ "DC9FB4",
+ "E16B8C",
+ "8E354A",
+ "F8C3CD",
+ "F4A7B9",
+ "64363C",
+ "F596AA",
+ "B5495B",
+ "E87A90",
+ "D05A6E",
+ "DB4D6D",
+ "FEDFE1",
+ "9E7A7A",
+ "D0104C",
+ "9F353A",
+ "CB1B45",
+ "EEA9A9",
+ "BF6766",
+ "86473F",
+ "B19693",
+ "EB7A77",
+ "954A45",
+ "A96360",
+ "CB4042",
+ "AB3B3A",
+ "D7C4BB",
+ "904840",
+ "734338",
+ "C73E3A",
+ "554236",
+ "994639",
+ "F19483",
+ "B54434",
+ "B9887D",
+ "F17C67",
+ "884C3A",
+ "E83015",
+ "D75455",
+ "B55D4C",
+ "854836",
+ "A35E47",
+ "CC543A",
+ "724832",
+ "F75C2F",
+ "6A4028",
+ "9A5034",
+ "C46243",
+ "AF5F3C",
+ "FB966E",
+ "724938",
+ "B47157",
+ "DB8E71",
+ "F05E1C",
+ "ED784A",
+ "CA7853",
+ "B35C37",
+ "563F2E",
+ "E3916E",
+ "8F5A3C",
+ "F0A986",
+ "A0674B",
+ "C1693C",
+ "FB9966",
+ "947A6D",
+ "A36336",
+ "E79460",
+ "7D532C",
+ "C78550",
+ "985F2A",
+ "E1A679",
+ "855B32",
+ "FC9F4D",
+ "FFBA84",
+ "E98B2A",
+ "E9A368",
+ "B17844",
+ "96632E",
+ "43341B",
+ "CA7A2C",
+ "ECB88A",
+ "78552B",
+ "B07736",
+ "967249",
+ "E2943B",
+ "C7802D",
+ "9B6E23",
+ "6E552F",
+ "EBB471",
+ "D7B98E",
+ "82663A",
+ "B68E55",
+ "BC9F77",
+ "876633",
+ "C18A26",
+ "FFB11B",
+ "D19826",
+ "DDA52D",
+ "C99833",
+ "F9BF45",
+ "DCB879",
+ "BA9132",
+ "E8B647",
+ "F7C242",
+ "7D6C46",
+ "DAC9A6",
+ "FAD689",
+ "D9AB42",
+ "F6C555",
+ "FFC408",
+ "EFBB24",
+ "CAAD5F",
+ "8D742A",
+ "B4A582",
+ "877F6C",
+ "897D55",
+ "74673E",
+ "A28C37",
+ "6C6024",
+ "867835",
+ "62592C",
+ "E9CD4C",
+ "F7D94C",
+ "FBE251",
+ "D9CD90",
+ "ADA142",
+ "DDD23B",
+ "A5A051",
+ "BEC23F",
+ "6C6A2D",
+ "939650",
+ "838A2D",
+ "B1B479",
+ "616138",
+ "4B4E2A",
+ "5B622E",
+ "4D5139",
+ "89916B",
+ "90B44B",
+ "91AD70",
+ "B5CAA0",
+ "646A58",
+ "7BA23F",
+ "86C166",
+ "4A593D",
+ "42602D",
+ "516E41",
+ "91B493",
+ "808F7C",
+ "1B813E",
+ "5DAC81",
+ "36563C",
+ "227D51",
+ "A8D8B9",
+ "6A8372",
+ "2D6D4B",
+ "465D4C",
+ "24936E",
+ "86A697",
+ "00896C",
+ "096148",
+ "20604F",
+ "0F4C3A",
+ "4F726C",
+ "00AA90",
+ "69B0AC",
+ "26453D",
+ "66BAB7",
+ "268785",
+ "405B55",
+ "305A56",
+ "78C2C4",
+ "376B6D",
+ "A5DEE4",
+ "77969A",
+ "6699A1",
+ "81C7D4",
+ "33A6B8",
+ "0C4842",
+ "0D5661",
+ "0089A7",
+ "336774",
+ "255359",
+ "1E88A8",
+ "566C73",
+ "577C8A",
+ "58B2DC",
+ "2B5F75",
+ "3A8FB7",
+ "2E5C6E",
+ "006284",
+ "7DB9DE",
+ "51A8DD",
+ "2EA9DF",
+ "0B1013",
+ "0F2540",
+ "08192D",
+ "005CAF",
+ "0B346E",
+ "7B90D2",
+ "6E75A4",
+ "261E47",
+ "113285",
+ "4E4F97",
+ "211E55",
+ "8B81C3",
+ "70649A",
+ "9B90C2",
+ "8A6BBE",
+ "6A4C9C",
+ "8F77B5",
+ "533D5B",
+ "B28FCE",
+ "986DB2",
+ "77428D",
+ "3C2F41",
+ "4A225D",
+ "66327C",
+ "592C63",
+ "6F3381",
+ "574C57",
+ "B481BB",
+ "3F2B36",
+ "572A3F",
+ "5E3D50",
+ "72636E",
+ "622954",
+ "6D2E5B",
+ "C1328E",
+ "A8497A",
+ "562E37",
+ "E03C8A",
+ "60373E",
+ "FCFAF2",
+ "FFFFFB",
+ "BDC0BA",
+ "91989F",
+ "787878",
+ "828282",
+ "787D7B",
+ "707C74",
+ "656765",
+ "535953",
+ "4F4F48",
+ "52433D",
+ "373C38",
+ "3A3226",
+ "434343",
+ "1C1C1C",
+ "080808",
+ "0C0C0C"
+ ],
+ [
+ "撫子(nadeshiko)",
+ "紅梅(kohbai)",
+ "蘇芳(suoh)",
+ "退紅(taikoh)",
+ "一斥染(ikkonzome)",
+ "桑染(kuwazome)",
+ "桃(momo)",
+ "苺(ichigo)",
+ "薄紅(usubeni)",
+ "今様(imayoh)",
+ "中紅(nakabeni)",
+ "桜(sakura)",
+ "梅鼠(umenezumi)",
+ "韓紅花(karakurenai)",
+ "燕脂(enji)",
+ "紅(kurenai)",
+ "鴇(toki)",
+ "長春(cyohsyun)",
+ "深緋(kokiake)",
+ "桜鼠(sakuranezumi)",
+ "甚三紅(jinzamomi)",
+ "小豆(azuki)",
+ "蘇芳香(suohkoh)",
+ "赤紅(akabeni)",
+ "真朱(shinsyu)",
+ "灰桜(haizakura)",
+ "栗梅(kuriume)",
+ "海老茶(ebicha)",
+ "銀朱(ginsyu)",
+ "黒鳶(kurotobi)",
+ "紅鳶(benitobi)",
+ "曙(akebono)",
+ "紅樺(benikaba)",
+ "水がき(mizugaki)",
+ "珊瑚朱(sangosyu)",
+ "紅檜皮(benihiwada)",
+ "猩猩緋(syojyohi)",
+ "鉛丹(entan)",
+ "芝翫茶(shikancha)",
+ "檜皮(hiwada)",
+ "柿渋(kakishibu)",
+ "緋(ake)",
+ "鳶(tobi)",
+ "紅緋(benihi)",
+ "栗皮茶(kurikawacha)",
+ "弁柄(bengara)",
+ "照柿(terigaki)",
+ "江戸茶(edocha)",
+ "洗朱(araisyu)",
+ "百塩茶(momoshiocha)",
+ "唐茶(karacha)",
+ "ときがら茶(tokigaracha)",
+ "黄丹(ohni)",
+ "纁(sohi)",
+ "遠州茶(ensyucha)",
+ "樺茶(kabacha)",
+ "焦茶(kogecha)",
+ "赤香(akakoh)",
+ "雀茶(suzumecha)",
+ "宍(shishi)",
+ "宗伝唐茶(sodenkaracha)",
+ "樺(kaba)",
+ "深支子(kokikuchinashi)",
+ "胡桃(kurumi)",
+ "代赭(taisya)",
+ "洗柿(araigaki)",
+ "黄櫨染(kohrozen)",
+ "赤朽葉(akakuchiba)",
+ "礪茶(tonocha)",
+ "赤白橡(akashirotsurubami)",
+ "煎茶(sencha)",
+ "萱草(kanzo)",
+ "洒落柿(sharegaki)",
+ "紅鬱金(beniukon)",
+ "梅染(umezome)",
+ "枇杷茶(biwacha)",
+ "丁子茶(chojicha)",
+ "憲法染(kenpohzome)",
+ "琥珀(kohaku)",
+ "薄柿(usugaki)",
+ "伽羅(kyara)",
+ "丁子染(chojizome)",
+ "柴染(fushizome)",
+ "朽葉(kuchiba)",
+ "金茶(kincha)",
+ "狐(kitsune)",
+ "煤竹(susutake)",
+ "薄香(usukoh)",
+ "砥粉(tonoko)",
+ "銀煤竹(ginsusutake)",
+ "黄土(ohdo)",
+ "白茶(shiracha)",
+ "媚茶(kobicha)",
+ "黄唐茶(kigaracha)",
+ "山吹(yamabuki)",
+ "山吹茶(yamabukicha)",
+ "櫨染(hajizome)",
+ "桑茶(kuwacha)",
+ "玉子(tamago)",
+ "白橡(shirotsurubami)",
+ "黄橡(kitsurubami)",
+ "玉蜀黍(tamamorokoshi)",
+ "花葉(hanaba)",
+ "生壁(namakabe)",
+ "鳥の子(torinoko)",
+ "浅黄(usuki)",
+ "黄朽葉(kikuchiba)",
+ "梔子(kuchinashi)",
+ "籐黄(tohoh)",
+ "鬱金(ukon)",
+ "芥子(karashi)",
+ "肥後煤竹(higosusutake)",
+ "利休白茶(rikyushiracha)",
+ "灰汁(aku)",
+ "利休茶(rikyucha)",
+ "路考茶(rokohcha)",
+ "菜種油(nataneyu)",
+ "鶯茶(uguisucha)",
+ "黄海松茶(kimirucha)",
+ "海松茶(mirucha)",
+ "刈安(kariyasu)",
+ "菜の花(nanohana)",
+ "黄蘗(kihada)",
+ "蒸栗(mushikuri)",
+ "青朽葉(aokuchiba)",
+ "女郎花(ominaeshi)",
+ "鶸茶(hiwacha)",
+ "鶸(hiwa)",
+ "鶯(uguisu)",
+ "柳茶(yanagicha)",
+ "苔(koke)",
+ "麹塵(kikujin)",
+ "璃寛茶(rikancha)",
+ "藍媚茶(aikobicha)",
+ "海松(miru)",
+ "千歳茶(sensaicha)",
+ "梅幸茶(baikocha)",
+ "鶸萌黄(hiwamoegi)",
+ "柳染(yanagizome)",
+ "裏柳(urayanagi)",
+ "岩井茶(iwaicha)",
+ "萌黄(moegi)",
+ "苗(nae)",
+ "柳煤竹(yanagisusutake)",
+ "松葉(matsuba)",
+ "青丹(aoni)",
+ "薄青(usuao)",
+ "柳鼠(yanaginezumi)",
+ "常磐(tokiwa)",
+ "若竹(wakatake)",
+ "千歳緑(chitosemidori)",
+ "緑(midori)",
+ "白緑(byakuroku)",
+ "老竹(oitake)",
+ "木賊(tokusa)",
+ "御納戸茶(onandocha)",
+ "緑青(rokusyoh)",
+ "錆青磁(sabiseiji)",
+ "青竹(aotake)",
+ "ビロード(veludo)",
+ "虫襖(mushiao)",
+ "藍海松茶(aimirucha)",
+ "沈香茶(tonocha2)",
+ "青緑(aomidori)",
+ "青磁(seiji)",
+ "鉄(tetsu)",
+ "水浅葱(mizuasagi)",
+ "青碧(seiheki)",
+ "錆鉄御納戸(sabitetsuonando)",
+ "高麗納戸(korainando)",
+ "白群(byakugun)",
+ "御召茶(omeshicha)",
+ "瓶覗(kamenozoki)",
+ "深川鼠(fukagawanezumi)",
+ "錆浅葱(sabiasagi)",
+ "水(mizu)",
+ "浅葱(asagi)",
+ "御納戸(onando)",
+ "藍(ai)",
+ "新橋(shinbashi)",
+ "錆御納戸(sabionando)",
+ "鉄御納戸(tetsuonando)",
+ "花浅葱(hanaasagi)",
+ "藍鼠(ainezumi)",
+ "舛花(masuhana)",
+ "空(sora)",
+ "熨斗目花(noshimehana)",
+ "千草(chigusa)",
+ "御召御納戸(omeshionando)",
+ "縹(hanada)",
+ "勿忘草(wasurenagusa)",
+ "群青(gunjyo)",
+ "露草(tsuyukusa)",
+ "黒橡(kurotsurubami)",
+ "紺(kon)",
+ "褐(kachi)",
+ "瑠璃(ruri)",
+ "瑠璃紺(rurikon)",
+ "紅碧(benimidori)",
+ "藤鼠(fujinezumi)",
+ "鉄紺(tetsukon)",
+ "紺青(konjyo)",
+ "紅掛花(benikakehana)",
+ "紺桔梗(konkikyo)",
+ "藤(fuji)",
+ "二藍(futaai)",
+ "楝(ouchi)",
+ "藤紫(fujimurasaki)",
+ "桔梗(kikyo)",
+ "紫苑(shion)",
+ "滅紫(messhi)",
+ "薄(usu)",
+ "半(hashita)",
+ "江戸紫(edomurasaki)",
+ "紫紺(shikon)",
+ "深紫(kokimurasaki)",
+ "菫(sumire)",
+ "紫(murasaki)",
+ "菖蒲(ayame)",
+ "藤煤竹(fujisusutake)",
+ "紅藤(benifuji)",
+ "黒紅(kurobeni)",
+ "茄子紺(nasukon)",
+ "葡萄鼠(budohnezumi)",
+ "鳩羽鼠(hatobanezumi)",
+ "杜若(kakitsubata)",
+ "蒲葡(ebizome)",
+ "牡丹(botan)",
+ "梅紫(umemurasaki)",
+ "似紫(nisemurasaki)",
+ "躑躅(tsutsuji)",
+ "紫鳶(murasakitobi)",
+ "白練(shironeri)",
+ "胡粉(gofun)",
+ "白鼠(shironezumi)",
+ "銀鼠(ginnezumi)",
+ "鉛(namari)",
+ "灰(hai)",
+ "素鼠(sunezumi)",
+ "利休鼠(rikyunezumi)",
+ "鈍(nibi)",
+ "青鈍(aonibi)",
+ "溝鼠(dobunezumi)",
+ "紅消鼠(benikeshinezumi)",
+ "藍墨茶(aisumicha)",
+ "檳榔子染(binrojizome)",
+ "消炭(keshizumi)",
+ "墨(sumi)",
+ "黒(kuro)",
+ "呂(ro)"
+ ]
+ ],
+ "grid_values": {
+ "col": 16.0
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/demo/palettes/README.md b/demo/02_color_palettes/README.md
similarity index 95%
rename from demo/palettes/README.md
rename to demo/02_color_palettes/README.md
index 1d98d4f..b5e3370 100644
--- a/demo/palettes/README.md
+++ b/demo/02_color_palettes/README.md
@@ -8,10 +8,10 @@ Steps:
1. Install the Rickrack software.
2. Click "Open" and find this color palette.
-![Open the palette.](../usage/800.gif)
+![Open the palette.](../00_usage/800.gif)
4. Check the color palette.
-![Check the palette.](../usage/801.gif)
+![Check the palette.](../00_usage/801.gif)
Rickrack is a free software, which is distributed in the hope that it will be useful, but without any warranty. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. See the [GNU General Public License 3.0 (GPL 3.0)](https://www.gnu.org/licenses/) for more details.
diff --git a/demo/palettes/Rickrack_Spring_Colors_2023.dpc b/demo/02_color_palettes/Rickrack_Spring_Colors_2023.dpc
similarity index 100%
rename from demo/palettes/Rickrack_Spring_Colors_2023.dpc
rename to demo/02_color_palettes/Rickrack_Spring_Colors_2023.dpc
diff --git a/demo/palettes/images/README.txt b/demo/02_color_palettes/images/README.txt
similarity index 100%
rename from demo/palettes/images/README.txt
rename to demo/02_color_palettes/images/README.txt
diff --git a/demo/palettes/images/apple-blossom-1368187_1280.jpg b/demo/02_color_palettes/images/apple-blossom-1368187_1280.jpg
similarity index 100%
rename from demo/palettes/images/apple-blossom-1368187_1280.jpg
rename to demo/02_color_palettes/images/apple-blossom-1368187_1280.jpg
diff --git a/demo/palettes/images/bird-7839371_1280.jpg b/demo/02_color_palettes/images/bird-7839371_1280.jpg
similarity index 100%
rename from demo/palettes/images/bird-7839371_1280.jpg
rename to demo/02_color_palettes/images/bird-7839371_1280.jpg
diff --git a/demo/palettes/images/chipmunk-2323827_1280.jpg b/demo/02_color_palettes/images/chipmunk-2323827_1280.jpg
similarity index 100%
rename from demo/palettes/images/chipmunk-2323827_1280.jpg
rename to demo/02_color_palettes/images/chipmunk-2323827_1280.jpg
diff --git a/demo/palettes/images/grape-hyacinth-7858303_1280.jpg b/demo/02_color_palettes/images/grape-hyacinth-7858303_1280.jpg
similarity index 100%
rename from demo/palettes/images/grape-hyacinth-7858303_1280.jpg
rename to demo/02_color_palettes/images/grape-hyacinth-7858303_1280.jpg
diff --git a/demo/palettes/images/japanese-cherry-blossom-1839982_1280.jpg b/demo/02_color_palettes/images/japanese-cherry-blossom-1839982_1280.jpg
similarity index 100%
rename from demo/palettes/images/japanese-cherry-blossom-1839982_1280.jpg
rename to demo/02_color_palettes/images/japanese-cherry-blossom-1839982_1280.jpg
diff --git a/demo/palettes/images/lavenders-1537694_1280.jpg b/demo/02_color_palettes/images/lavenders-1537694_1280.jpg
similarity index 100%
rename from demo/palettes/images/lavenders-1537694_1280.jpg
rename to demo/02_color_palettes/images/lavenders-1537694_1280.jpg
diff --git a/demo/palettes/images/spring-flowers-110671_1280.jpg b/demo/02_color_palettes/images/spring-flowers-110671_1280.jpg
similarity index 100%
rename from demo/palettes/images/spring-flowers-110671_1280.jpg
rename to demo/02_color_palettes/images/spring-flowers-110671_1280.jpg
diff --git a/demo/palettes/images/tulips-1261142_1280.jpg b/demo/02_color_palettes/images/tulips-1261142_1280.jpg
similarity index 100%
rename from demo/palettes/images/tulips-1261142_1280.jpg
rename to demo/02_color_palettes/images/tulips-1261142_1280.jpg
diff --git a/demo/palettes/images/tulips-7864592_1280.jpg b/demo/02_color_palettes/images/tulips-7864592_1280.jpg
similarity index 100%
rename from demo/palettes/images/tulips-7864592_1280.jpg
rename to demo/02_color_palettes/images/tulips-7864592_1280.jpg
diff --git a/demo/plots/README.md b/demo/03_plot_scripts/README.md
similarity index 100%
rename from demo/plots/README.md
rename to demo/03_plot_scripts/README.md
diff --git a/demo/plots/diagram.png b/demo/03_plot_scripts/diagram.png
similarity index 100%
rename from demo/plots/diagram.png
rename to demo/03_plot_scripts/diagram.png
diff --git a/demo/plots/diagram.py b/demo/03_plot_scripts/diagram.py
similarity index 100%
rename from demo/plots/diagram.py
rename to demo/03_plot_scripts/diagram.py
diff --git a/demo/plots/map/PRC.dbf b/demo/03_plot_scripts/map/PRC.dbf
similarity index 100%
rename from demo/plots/map/PRC.dbf
rename to demo/03_plot_scripts/map/PRC.dbf
diff --git a/demo/plots/map/PRC.prj b/demo/03_plot_scripts/map/PRC.prj
similarity index 100%
rename from demo/plots/map/PRC.prj
rename to demo/03_plot_scripts/map/PRC.prj
diff --git a/demo/plots/map/PRC.shp b/demo/03_plot_scripts/map/PRC.shp
similarity index 100%
rename from demo/plots/map/PRC.shp
rename to demo/03_plot_scripts/map/PRC.shp
diff --git a/demo/plots/map/PRC.shx b/demo/03_plot_scripts/map/PRC.shx
similarity index 100%
rename from demo/plots/map/PRC.shx
rename to demo/03_plot_scripts/map/PRC.shx
diff --git a/demo/plots/map/README.md b/demo/03_plot_scripts/map/README.md
similarity index 100%
rename from demo/plots/map/README.md
rename to demo/03_plot_scripts/map/README.md
diff --git a/demo/plots/map/source.png b/demo/03_plot_scripts/map/source.png
similarity index 100%
rename from demo/plots/map/source.png
rename to demo/03_plot_scripts/map/source.png
diff --git a/rickrack/color.py b/rickrack/color.py
index f87556a..473e4e3 100644
--- a/rickrack/color.py
+++ b/rickrack/color.py
@@ -13,6 +13,7 @@
Copyright (c) 2019-2021 by Eigenmiao. All Rights Reserved.
"""
+import re
import unittest
import numpy as np
@@ -544,18 +545,13 @@ def fmt_hec(cls, hec):
standard hex code (hec) color.
"""
- if not isinstance(hec, str):
- raise ValueError("expect hex code (hec) in str type: {}.".format(hec))
+ _hec = re.match(r"[0-9A-F]+", str(hec).upper())
- if len(hec) == 6:
- for stri in hec.upper():
- if stri not in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"):
- raise ValueError("expect code in hex type: {}.".format(hec))
+ if _hec and len(_hec[0]) == 6:
+ return _hec[0]
else:
- raise ValueError("expect hex code (hec) in length 6: {}.".format(hec))
-
- return hec.upper()
+ raise ValueError("expect hec color in hex type and length 6: {}.".format(hec))
@classmethod
def fmt_lab(cls, lab):
@@ -608,6 +604,73 @@ def fmt_cmyk(cls, cmyk):
else:
raise ValueError("expect cmyk color in length 4 and float: {}.".format(cmyk))
+ @classmethod
+ def findall_hec_lst(cls, hec):
+ """
+ Class method. Format item to standard hex code (hec) color.
+
+ Args:
+ hec (str): color item to be formated.
+
+ Returns:
+ standard hex code (hec) color.
+ """
+
+ _hec = re.findall(r"[0-9A-F]+", str(hec).upper())
+ _hec = ["" if len(i) < 6 else i[:6] for i in _hec]
+
+ while "" in _hec:
+ _hec.remove("")
+
+ return _hec
+
+ @classmethod
+ def stri2color(cls, stri):
+ """
+ Find the first possible color in string.
+
+ Args:
+ stri (str): rgb, hsv or hec color string.
+
+ Returns:
+ color.
+ """
+
+ _stri = re.findall(r"[0-9A-F\.]+", str(stri).upper())
+
+ if len(_stri) > 2:
+ _num = re.findall(r"[0-9\.]+", str(stri))
+
+ if len(_num) > 2:
+ _a, _b, _c = _num[:3]
+ _a = float(".".join(_a.split(".")[:2])) if "." in _a else int(_a)
+ _b = float(".".join(_b.split(".")[:2])) if "." in _b else int(_b)
+ _c = float(".".join(_c.split(".")[:2])) if "." in _c else int(_c)
+
+ if _a > 255:
+ return Color((_a, _b, _c), tp="hsv")
+
+ elif _b > 1.0 or _c > 1.0:
+ return Color((_a, _b, _c), tp="rgb")
+
+ elif isinstance(_a, float) or isinstance(_b, float) or isinstance(_c, float):
+ return Color((_a, _b, _c), tp="hsv")
+
+ else:
+ return Color((_a, _b, _c), tp="rgb")
+
+ else:
+ return None
+
+ elif len(_stri) > 0:
+ if len(_stri[0]) > 5:
+ return Color(Color.fmt_hec(_stri[0]), tp="hec")
+
+ return None
+
+ else:
+ return None
+
@classmethod
def rgb2hsv(cls, rgb):
"""
@@ -974,11 +1037,11 @@ def lab2rgb(cls, lab, white_ref=(95.047, 100.0, 108.883)):
rgb color.
"""
- lab = cls.fmt_lab(lab)
+ l, a, b = cls.fmt_lab(lab)
- y = (lab[0] + 16) / 116
- x = lab[1] / 500 + y
- z = y - lab[2] / 200
+ y = (l + 16) / 116
+ x = a / 500 + y
+ z = y - b / 200
normed_xyz = [i ** 3 if i > 0.008856 else (i - 16 / 116) / 7.787 for i in (x, y, z)]
xyz = np.array(normed_xyz) * white_ref / 100.0
diff --git a/rickrack/rickrack.py b/rickrack/rickrack.py
index 760923f..b60fda3 100644
--- a/rickrack/rickrack.py
+++ b/rickrack/rickrack.py
@@ -17,7 +17,7 @@
"""
__VERSION__ = """
-v2.7.26-x2d3s3-stable
+v2.8.5-x2d3s3-pre
"""
__AUTHOR__ = """
@@ -25,7 +25,7 @@
"""
__DATE__ = """
-April 9, 2023
+May 21, 2023
"""
__HELP__ = """
@@ -787,13 +787,7 @@ def run(self, dp_argv={}, dp_proj=""):
elif os.path.isfile(os.sep.join([os.path.abspath(os.path.dirname(__file__)), "data.json"])):
with open(os.sep.join([os.path.abspath(os.path.dirname(__file__)), "data.json"]), "r", encoding="utf-8") as f:
- try:
- data = json.load(f)
-
- except Exception as err:
- print("Load project data faild:\n{}".format(err))
-
- data = {}
+ data = json.load(f)
if "dp_proj" in data and data["dp_proj"]:
dirname, basename = para_dir(data["dp_proj"])
@@ -815,12 +809,8 @@ def run(self, dp_argv={}, dp_proj=""):
os.chdir(dirname)
- try:
- with open(os.sep.join([os.path.abspath(os.path.dirname(__file__)), "data.json"]), "w", encoding="utf-8") as f:
- json.dump({"dp_proj": dirname, "dp_exec": basename}, f, indent=4, ensure_ascii=False)
-
- except Exception as err:
- print("Dump project data faild:\n{}".format(err))
+ with open(os.sep.join([os.path.abspath(os.path.dirname(__file__)), "data.json"]), "w", encoding="utf-8") as f:
+ json.dump({"dp_proj": dirname, "dp_exec": basename}, f, indent=4, ensure_ascii=False)
# run project.
sdp_argv = dict()
@@ -1017,13 +1007,7 @@ def _load(self, log_text):
rt_gcol = len(color_line)
for i in range(len(color_line)):
- try:
- color_line[i] = Color.fmt_hec(color_line[i])
-
- except Exception as err:
- print("Parse colors in grid faild:\n{}".format(color_line[i]))
-
- color_line[i] = self._default_color
+ color_line[i] = Color.fmt_hec(color_line[i])
rt_cgrd += color_line
@@ -1033,13 +1017,7 @@ def _load(self, log_text):
color_line = line[4:].split(" ")
for i in range(len(color_line)):
- try:
- color_line[i] = Color.fmt_hec(color_line[i])
-
- except Exception as err:
- print("Parse colors in grid faild:\n{}".format(color_line[i]))
-
- color_line[i] = self._default_color
+ color_line[i] = Color.fmt_hec(color_line[i])
rt_refs = color_line
@@ -1048,13 +1026,7 @@ def _load(self, log_text):
if line[2] == "*":
rt_cidx = int(line[4])
- try:
- rt_cset[int(line[4])] = Color.fmt_hec(line[3:].split()[7])
-
- except Exception as err:
- print("Parse colors for id {} faild:\n{}".format(line[4], err))
-
- rt_cset[int(line[4])] = self._default_color
+ rt_cset[int(line[4])] = Color.fmt_hec(line[3:].split()[7])
elif line[4:8] == "Rule":
rt_rule = line[10:].lstrip().rstrip()
@@ -1084,36 +1056,16 @@ def _load(self, log_text):
data_grid_name = data_grid_name[1:-1].split('" "')
for i in range(5):
- try:
- rt_cset[(2, 1, 0, 3, 4)[i]] = Color.fmt_hec(data_set[i])
-
- except Exception as err:
- print("Parse colors for id {} faild:\n{}".format(i, err))
-
- rt_cset[i] = self._default_color
+ rt_cset[(2, 1, 0, 3, 4)[i]] = Color.fmt_hec(data_set[i])
for i in range(len(data_set) - 6):
- try:
- rt_refs.append(Color.fmt_hec(data_set[i + 6]))
-
- except Exception as err:
- print("Parse ref colors for id {} faild:\n{}".format(i, err))
-
- rt_refs.append(self._default_color)
- rt_refs_name.append("RR")
+ rt_refs.append(Color.fmt_hec(data_set[i + 6]))
for i in range(len(data_grid)):
- try:
- rt_cgrd.append(Color.fmt_hec(data_grid[i]))
-
- if data_grid_name:
- rt_cgrd_name.append(data_grid_name[i])
-
- except Exception as err:
- print("Parse color grid for id {} faild:\n{}".format(i, err))
+ rt_cgrd.append(Color.fmt_hec(data_grid[i]))
- rt_cgrd.append(self._default_color)
- rt_cgrd_name.append("RR")
+ if data_grid_name:
+ rt_cgrd_name.append(data_grid_name[i])
rt_cset = Grid(rt_cset, rt_cset_name, 5)
rt_refs = Grid(rt_refs, rt_refs_name, len(rt_refs))
diff --git a/setup.py b/setup.py
index 1c1d1e7..7caffa5 100644
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,7 @@
setup(
name="Rickrack",
- version="2.7.26",
+ version="2.8.5",
author="Eigenmiao",
author_email="eigenmiao@outlook.com",
description="Generate harmonious colors freely.",
diff --git a/src/build/settings/base.json b/src/build/settings/base.json
index dee177d..4258bf6 100644
--- a/src/build/settings/base.json
+++ b/src/build/settings/base.json
@@ -2,5 +2,5 @@
"app_name": "Rickrack",
"author": "Eigenmiao",
"main_module": "src/main/python/main.py",
- "version": "2.7.26"
+ "version": "2.8.5"
}
\ No newline at end of file
diff --git a/src/main/python/cguis/design/scroll_cube.py b/src/main/python/cguis/design/scroll_cube.py
index 7b3e9b9..67e3325 100644
--- a/src/main/python/cguis/design/scroll_cube.py
+++ b/src/main/python/cguis/design/scroll_cube.py
@@ -33,7 +33,7 @@ def setupUi(self, ScrollCube):
self.le_hec.setMaximumSize(QtCore.QSize(80, 16777215))
self.le_hec.setFocusPolicy(QtCore.Qt.StrongFocus)
self.le_hec.setContextMenuPolicy(QtCore.Qt.NoContextMenu)
- self.le_hec.setMaxLength(6)
+ self.le_hec.setMaxLength(100)
self.le_hec.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.le_hec.setObjectName("le_hec")
self.gridLayout.addWidget(self.le_hec, 1, 2, 1, 1)
diff --git a/src/main/python/clibs/image3c.py b/src/main/python/clibs/image3c.py
index 2765e7a..3d68ba9 100644
--- a/src/main/python/clibs/image3c.py
+++ b/src/main/python/clibs/image3c.py
@@ -621,14 +621,21 @@ def load_image(self, category, channel):
if os.path.isfile(img_path):
try:
img_data = Image.open(img_path).convert("RGB")
+
+ except Exception as err:
+ img_data = None
+
+ if img_data:
self.ori_display_data = np.array(img_data, dtype=np.uint8)
self.display = QImage(self.ori_display_data, self.ori_display_data.shape[1], self.ori_display_data.shape[0], self.ori_display_data.shape[1] * 3, QImage.Format_RGB888)
self.res_display_data = self.ori_display_data
self.rev_display_data = None
- except Exception as err:
+ else:
self.display = None
+ self.res_display_data = None
+ self.rev_display_data = None
else:
self.display = None
@@ -911,6 +918,11 @@ def run_cover_rgb(self, process_scope, values):
data = Image.open(path).convert("RGB")
data = np.array(data, dtype=np.uint8)
+ except Exception as err:
+ data = None
+ self.ps_enhanced.emit(3)
+
+ if isinstance(data, np.ndarray):
if data.shape == display_data.shape:
for k in reg:
display_data[:, :, k] = data[:, :, k]
@@ -918,9 +930,6 @@ def run_cover_rgb(self, process_scope, values):
else:
self.ps_enhanced.emit(2)
- except Exception as err:
- self.ps_enhanced.emit(3)
-
else:
self.ps_enhanced.emit(3)
@@ -958,6 +967,11 @@ def run_cover_hsv(self, process_scope, values):
data = Image.open(path).convert("RGB")
data = np.array(data, dtype=np.uint8)
+ except Exception as err:
+ data = None
+ self.ps_enhanced.emit(3)
+
+ if isinstance(data, np.ndarray):
if data.shape == display_data.shape:
data = Color.rgb2hsv_array(data)
@@ -967,9 +981,6 @@ def run_cover_hsv(self, process_scope, values):
else:
self.ps_enhanced.emit(2)
- except Exception as err:
- self.ps_enhanced.emit(3)
-
else:
self.ps_enhanced.emit(3)
diff --git a/src/main/python/main.py b/src/main/python/main.py
index 1064ac0..87b22d0 100644
--- a/src/main/python/main.py
+++ b/src/main/python/main.py
@@ -17,7 +17,7 @@
"""
__VERSION__ = """
-v2.7.26-x2d3s3-stable
+v2.8.5-x2d3s3-pre
"""
__AUTHOR__ = """
@@ -25,7 +25,7 @@
"""
__DATE__ = """
-April 9, 2023
+May 21, 2023
"""
__HELP__ = """
@@ -289,25 +289,25 @@ def __init__(self, resources, sys_argv):
self._load_last_work()
if self._sys_argv["input"]:
- try:
- if self._sys_argv["input"].split(".")[-1].lower() in ("png", "bmp", "jpg", "jpeg", "tif", "tiff", "webp"):
- self._inner_locate(False)(False)
- self._wget_image.open_image(self._sys_argv["input"])
+ if self._sys_argv["input"].split(".")[-1].lower() in ("png", "bmp", "jpg", "jpeg", "tif", "tiff", "webp"):
+ self._inner_locate(False)(False)
+ self._wget_image.open_image(self._sys_argv["input"])
- else:
+ else:
+ try:
with open(self._sys_argv["input"], "r", encoding="utf-8") as f:
color_dict = json.load(f)
- if isinstance(color_dict, dict) and "type" in color_dict:
- if color_dict["type"] == "depot":
- self._inner_attach(False)(False)
- self._wget_operation.dp_open(self._sys_argv["input"])
+ except Exception as err:
+ color_dict = None
- elif color_dict["type"] == "set":
- self._wget_operation.dp_import(self._sys_argv["input"])
+ if isinstance(color_dict, dict) and "type" in color_dict:
+ if color_dict["type"] == "depot":
+ self._inner_attach(False)(False)
+ self._wget_operation.dp_open(color_dict, direct_dict=True, dp_path=os.path.dirname(os.path.abspath(self._sys_argv["input"])))
- except Exception as err:
- pass
+ elif color_dict["type"] == "set":
+ self._wget_operation.dp_import(color_dict, direct_dict=True)
# show args loading errors.
if self._args.load_settings_failed:
@@ -461,6 +461,9 @@ def _depot_status(value):
self._wget_board.ps_status_changed.connect(_board_status)
self._wget_depot.ps_status_changed.connect(_depot_status)
+ self._wget_board.ps_transfer_image.connect(lambda x: self._inner_locate(False)(False))
+ self._wget_board.ps_transfer_image.connect(lambda x: self._wget_image.open_image(x, direct=True))
+
self._wget_wheel.show()
self._wget_image.hide()
self._wget_board.hide()
@@ -614,7 +617,9 @@ def _setup_script(self):
self._wget_script.ps_filter.connect(lambda x: self._wget_image.open_image("", script=x))
self._wget_script.ps_crop.connect(self._wget_image.crop_image)
self._wget_script.ps_freeze.connect(self._wget_image.freeze_image)
+ self._wget_script.ps_freeze.connect(self._wget_board.freeze_image)
self._wget_script.ps_print.connect(self._wget_image.print_image)
+ self._wget_script.ps_print.connect(self._wget_board.print_image)
self._wget_script.ps_extract.connect(self._wget_image.extract_image)
def _setup_channel(self):
@@ -734,52 +739,6 @@ def _load_last_work(self):
if not os.path.isdir(os.sep.join((store_path, "MyColors"))):
os.makedirs(os.sep.join((store_path, "MyColors")))
- if not os.path.isfile(os.sep.join((store_path, "depot.json"))):
- data = {"version": self._args.info_version_en, "site": self._args.info_main_site, "type": "set"}
- data_palettes = []
-
- # don't use tag "%B".
- # it would use chinese characters in some systems.
- cur_time = time.time() # time.mktime(time.strptime(self._args.info_date_en, "%B %d, %Y"))
-
- for recommend_idx in range(2):
- with open(os.sep.join((self._args.resources, "colors", ("chinese_colors.json", "nippon_colors.json")[recommend_idx])), "r", encoding="utf-8") as cf:
- cf_data = json.load(cf)
- fm_data = {
- "rule": "custom",
- "name": self._recommend_descs[recommend_idx],
- "desc": self._recommend_descs[2].format(self._recommend_descs[0], cf_data["website"], cf_data["reference"], cf_data["publisher"]),
- "time": (cur_time, cur_time),
- "color_2": {"hex_code": cf_data["colors"][0],},
- "color_1": {"hex_code": cf_data["colors"][1],},
- "color_0": {"hex_code": cf_data["colors"][2],},
- "color_3": {"hex_code": cf_data["colors"][3],},
- "color_4": {"hex_code": cf_data["colors"][4],},
- "grid_list": (cf_data["colors"], [self._recommend_descs[3].format(i[0], i[1]) for i in zip(cf_data["names"], cf_data["pronunciations"])]),
- "grid_values": {"col": np.ceil(np.sqrt(len(cf_data["colors"]))),},
- }
-
- data["palettes"] = [fm_data,]
- data_palettes.append(fm_data)
-
- try:
- with open(os.sep.join((store_path, "MyColors", ("chinese_colors.dps", "nippon_colors.dps")[recommend_idx])), "w", encoding="utf-8") as df:
- json.dump(data, df, indent=4, ensure_ascii=False)
-
- except Exception as err:
- pass
-
- if len(self._args.stab_ucells) <= 1:
- data["type"] = "depot"
- data["palettes"] = data_palettes
-
- try:
- with open(os.sep.join((store_path, "depot.json")), "w", encoding="utf-8") as df:
- json.dump(data, df, indent=4, ensure_ascii=False)
-
- except Exception as err:
- pass
-
# loading deopt.
if os.path.isfile(os.sep.join((store_path, "depot.json"))) and self._sys_argv["reset"] not in ("depot", "work", "all"):
self._wget_operation.dp_open(os.sep.join((store_path, "depot.json")))
@@ -850,8 +809,8 @@ def _func_(value):
if self.rule_dock_widget.isVisible():
self.rule_dock_widget.raise_()
- if self.operation_dock_widget.isVisible():
- self.operation_dock_widget.raise_()
+ # if self.operation_dock_widget.isVisible():
+ # self.operation_dock_widget.raise_()
if self.mode_dock_widget.isVisible():
self.mode_dock_widget.raise_()
@@ -919,8 +878,8 @@ def _func_(value):
if self.rule_dock_widget.isVisible():
self.rule_dock_widget.raise_()
- if self.operation_dock_widget.isVisible():
- self.operation_dock_widget.raise_()
+ # if self.operation_dock_widget.isVisible():
+ # self.operation_dock_widget.raise_()
if self.mode_dock_widget.isVisible():
self.mode_dock_widget.raise_()
@@ -953,8 +912,8 @@ def _func_(value):
if self.rule_dock_widget.isVisible():
self.rule_dock_widget.raise_()
- if self.operation_dock_widget.isVisible():
- self.operation_dock_widget.raise_()
+ # if self.operation_dock_widget.isVisible():
+ # self.operation_dock_widget.raise_()
if self.transformation_dock_widget.isVisible():
self.transformation_dock_widget.raise_()
@@ -1103,14 +1062,14 @@ def _install_translator(self):
if self._sys_argv["port"]:
port_info = "端口:{}".format(self._sys_argv["port"])
- main_info = self._recommend_descs[3].format(main_info, port_info)
+ main_info = self._info_descs[12].format(main_info, port_info)
else:
main_info = "Rickrack {}".format("-".join((self._args.info_version_en.split("-")[0], self._args.info_version_en.split("-")[2])))
if self._sys_argv["port"]:
port_info = "Port: {}".format(self._sys_argv["port"])
- main_info = self._recommend_descs[3].format(main_info, port_info)
+ main_info = self._info_descs[12].format(main_info, port_info)
self.setWindowTitle(main_info)
@@ -1511,33 +1470,11 @@ def save_main_settings(self):
json_hash = ""
temp_hash = ""
- with open(os.sep.join((store_path, "set.json")), "r", encoding="utf-8") as frp:
- color_dict = {}
-
- try:
- color_dict = json.load(frp)
- color_dict["palettes"][0].pop("time")
- color_dict["palettes"][0].pop("name")
- color_dict["palettes"][0].pop("desc")
-
- except Exception as err:
- pass
-
- json_hash = hashlib.md5(str(color_dict).encode("utf-8")).hexdigest()
-
- with open(os.sep.join((store_path, "set.temp")), "r", encoding="utf-8") as frp:
- color_dict = {}
-
- try:
- color_dict = json.load(frp)
- color_dict["palettes"][0].pop("time")
- color_dict["palettes"][0].pop("name")
- color_dict["palettes"][0].pop("desc")
-
- except Exception as err:
- pass
+ with open(os.sep.join((store_path, "set.json")), "rb") as frp:
+ json_hash = hashlib.md5(frp.read()).hexdigest()
- temp_hash = hashlib.md5(str(color_dict).encode("utf-8")).hexdigest()
+ with open(os.sep.join((store_path, "set.temp")), "rb") as frp:
+ temp_hash = hashlib.md5(frp.read()).hexdigest()
if json_hash != temp_hash or (not json_hash) or (not temp_hash):
for backup_file in os.listdir(os.sep.join((store_path, "History", "Sets"))):
@@ -1863,6 +1800,7 @@ def _func_tr_(self):
_translate("Rickrack", "All images, documents and translations in Rickrack code repository are licensed under Creative Commons Attribution-NonCommercial-ShareAlike License 4.0 (CC BY-NC-SA 4.0) unless stating additionally."),
_translate("Rickrack", "Rickrack default uses Noto Serif (SC) fonts and Noto Sans (SC) fonts for interface display, which are designed by Google and published in website Google Fonts."),
_translate("Rickrack", "Support Rickrack!"),
+ _translate("Rickrack", "{} ({})"),
)
self._status_descs = (
@@ -1898,13 +1836,6 @@ def _func_tr_(self):
_translate("Rickrack", "Magenta"),
)
- self._recommend_descs = (
- _translate("Rickrack", "Chinese Traditional Colors"),
- _translate("Rickrack", "Nippon Traditional Colors"),
- _translate("Rickrack", "This file contains {} from website {}. Reference: '{}'. Copyright (c) {}."),
- _translate("Rickrack", "{} ({})"),
- )
-
_QColorDialog = (
_translate("QColorDialog", "Hu&e:"),
_translate("QColorDialog", "&Sat:"),
diff --git a/src/main/python/ricore/args.py b/src/main/python/ricore/args.py
index d4e19fc..a3a3c6e 100644
--- a/src/main/python/ricore/args.py
+++ b/src/main/python/ricore/args.py
@@ -18,6 +18,7 @@
import re
import time
import locale
+import shutil
import unittest
from ricore.color_set import ColorSet
from ricore.check import check_key, check_file_name, check_nonempt_str_lst
@@ -34,12 +35,12 @@ def __init__(self, resources, resetall=False, uselang=""):
"""
# software version.
- self.info_version_zh = "v2.7.26-x2d3s3-稳定版"
- self.info_version_en = "v2.7.26-x2d3s3-stable"
+ self.info_version_zh = "v2.8.5-x2d3s3-预览版"
+ self.info_version_en = "v2.8.5-x2d3s3-pre"
# update date.
- self.info_date_zh = "2023年4月9日"
- self.info_date_en = "April 9, 2023"
+ self.info_date_zh = "2023年5月21日"
+ self.info_date_en = "May 21, 2023"
# temporary dir.
self.global_temp_dir = None
@@ -186,13 +187,9 @@ def init_settings(self):
"""
# load default language.
- try:
- default_locale = locale.getdefaultlocale()[0]
-
- except Exception as err:
- default_locale = ""
-
+ default_locale = locale.getdefaultlocale()[0]
default_locale = str(default_locale).lower() if default_locale else ""
+
user_prefer_locale = "en"
if len(default_locale) > 1:
@@ -225,11 +222,11 @@ def init_settings(self):
with open(os.sep.join((self.resources, "settings.json")), "r", encoding="utf-8") as sf:
uss = json.load(sf)
- if isinstance(uss, dict) and "store_loc" in uss:
- self.store_loc = bool(uss["store_loc"])
-
except Exception as err:
- pass
+ uss = None
+
+ if isinstance(uss, dict) and "store_loc" in uss:
+ self.store_loc = bool(uss["store_loc"])
# need verify and mkdirs.
if self.store_loc:
@@ -542,15 +539,10 @@ def pfmt_path(self, value, default):
Parse directory path.
"""
- try:
- ans = str(value)
-
- if os.path.isdir(ans):
- return ans
+ ans = str(value)
- except Exception as err:
- if self.global_log:
- print(err)
+ if os.path.isdir(ans):
+ return ans
return default
@@ -562,12 +554,11 @@ def pfmt_num_pair_in_scope(self, value, scope, dtype, default):
try:
ans = (dtype(value[0]), dtype(value[1]))
- if scope[0] <= ans[0] <= scope[1] and scope[0] <= ans[1] <= scope[1] and ans[0] <= ans[1]:
- return ans
-
except Exception as err:
- if self.global_log:
- print(err)
+ ans = None
+
+ if ans != None and scope[0] <= ans[0] <= scope[1] and scope[0] <= ans[1] <= scope[1] and ans[0] <= ans[1]:
+ return ans
return default
@@ -576,15 +567,10 @@ def pfmt_str_in_list(self, value, lst, default):
Parse string in list.
"""
- try:
- ans = str(value)
-
- if ans in lst:
- return ans
+ ans = str(value)
- except Exception as err:
- if self.global_log:
- print(err)
+ if ans in lst:
+ return ans
return default
@@ -596,12 +582,11 @@ def pfmt_num_in_scope(self, value, scope, dtype, default):
try:
ans = dtype(value)
- if scope[0] <= ans <= scope[1]:
- return ans
-
except Exception as err:
- if self.global_log:
- print(err)
+ ans = None
+
+ if ans != None and scope[0] <= ans <= scope[1]:
+ return ans
return default
@@ -613,11 +598,11 @@ def pfmt_value(self, value, dtype, default):
try:
ans = dtype(value)
- return ans
-
except Exception as err:
- if self.global_log:
- print(err)
+ ans = None
+
+ if ans != None:
+ return ans
return default
@@ -640,8 +625,7 @@ def pfmt_file_name(self, value, default):
if name_stri:
return name_stri
- else:
- return default
+ return default
def pfmt_rgb_color(self, value, default):
"""
@@ -651,12 +635,11 @@ def pfmt_rgb_color(self, value, default):
try:
ans = (int(value[0]), int(value[1]), int(value[2]))
- if 0 <= ans[0] <= 255 and 0 <= ans[2] <= 255 and 0 <= ans[2] <= 255:
- return ans
-
except Exception as err:
- if self.global_log:
- print(err)
+ ans = None
+
+ if ans != None and 0 <= ans[0] <= 255 and 0 <= ans[2] <= 255 and 0 <= ans[2] <= 255:
+ return ans
return default
@@ -753,19 +736,15 @@ def check_version_x(cls, version):
Check if settings file version is compatible.
"""
- try:
- ans = re.match(r"^v.+?-x(\d+)d.+?s.+-.*", version)
- if ans:
- return int(ans.group(1))
+ ans = re.match(r"^v.+?-x(\d+)d.+?s.+-.*", str(version))
- elif re.match(r"^v2\.[12].*", version):
- return 1
+ if ans:
+ return int(ans.group(1))
- else:
- return 0
+ elif re.match(r"^v2\.[12].*", str(version)):
+ return 1
- except Exception as err:
- # print(err)
+ else:
return 0
@classmethod
@@ -774,19 +753,15 @@ def check_version_d(cls, version):
Check if color depot file version is compatible.
"""
- try:
- ans = re.match(r"^v.+?-x.+?d(\d+)s.+-.*", version)
- if ans:
- return int(ans.group(1))
+ ans = re.match(r"^v.+?-x.+?d(\d+)s.+-.*", str(version))
- elif re.match(r"^v2\.[12].*", version):
- return 1
+ if ans:
+ return int(ans.group(1))
- else:
- return 0
+ elif re.match(r"^v2\.[12].*", str(version)):
+ return 1
- except Exception as err:
- # print(err)
+ else:
return 0
@classmethod
@@ -795,19 +770,15 @@ def check_version_s(cls, version):
Check if color set file version is compatible.
"""
- try:
- ans = re.match(r"^v.+?-x.+?d.+?s(\d+).*-.*", version)
- if ans:
- return int(ans.group(1))
+ ans = re.match(r"^v.+?-x.+?d.+?s(\d+).*-.*", str(version))
- elif re.match(r"^v2\.[12].*", version):
- return 1
+ if ans:
+ return int(ans.group(1))
- else:
- return 0
+ elif re.match(r"^v2\.[12].*", str(version)):
+ return 1
- except Exception as err:
- # print(err)
+ else:
return 0
def check_temp_dir(self):
@@ -830,14 +801,10 @@ def remove_temp_dir(self):
if os.path.isdir(temp_dir):
try:
- for doc in os.listdir(temp_dir):
- os.remove(os.sep.join((temp_dir, doc)))
-
- os.rmdir(temp_dir)
+ shutil.rmtree(temp_dir, ignore_errors=True)
except Exception as err:
- if self.global_log:
- print(err)
+ pass
class TestArgs(unittest.TestCase):
diff --git a/src/main/python/ricore/check.py b/src/main/python/ricore/check.py
index b453b09..58bb185 100644
--- a/src/main/python/ricore/check.py
+++ b/src/main/python/ricore/check.py
@@ -14,6 +14,7 @@
"""
import os
+import time
def check_key(name):
@@ -157,3 +158,78 @@ def check_image_desc(desc, parse_full_locs=True):
return image_url, []
return image_url, full_locs
+
+def fmt_name(name):
+ """
+ Delete prefix and endfix of name.
+ """
+
+ stri = str(name).lstrip().rstrip()
+ stri_prefix = ("Rickrack ", "Rickrack-", "Rickrack:")
+ stri_endfix = tuple([str(i) for i in range(10)] + ["-", ":", " "])
+
+ while len(stri) >= 9 and stri[:9] in stri_prefix:
+ stri = stri[9:].lstrip()
+
+ while len(stri) >= 1 and stri[-1] in stri_endfix:
+ stri = stri[:-1]
+
+ if stri:
+ return stri
+
+ else:
+ return "Rickrack"
+
+def fmt_im_time(im_time):
+ """
+ Verify and normalize value im_time.
+
+ Args:
+ im_time (tuple or list): default value.
+
+ Returns:
+ corrected time.
+ """
+
+ current_time = time.time()
+
+ init_time = 0
+ modify_time = 0
+
+ if isinstance(im_time, (tuple, list)):
+ if len(im_time) > 1:
+ init_time, modify_time = im_time[:2]
+
+ else:
+ init_time = im_time[0]
+ modify_time = 0
+
+ elif isinstance(im_time, (float, int)):
+ init_time = im_time
+ modify_time = 0
+
+ else:
+ init_time = 0
+ modify_time = 0
+
+ if isinstance(init_time, (int, float)):
+ init_time = float(init_time)
+ else:
+ init_time = 0
+
+ if isinstance(modify_time, (int, float)):
+ modify_time = float(modify_time)
+ else:
+ modify_time = 0
+
+ init_time = 0 if init_time < 0 else init_time
+ init_time = current_time if init_time > current_time else init_time
+
+ modify_time = 0 if modify_time < 0 else modify_time
+ modify_time = current_time if modify_time > current_time else modify_time
+
+ modify_time = init_time if modify_time < init_time else modify_time
+
+ cr_time = (init_time, modify_time)
+
+ return cr_time
diff --git a/src/main/python/ricore/color.py b/src/main/python/ricore/color.py
index f87556a..473e4e3 100644
--- a/src/main/python/ricore/color.py
+++ b/src/main/python/ricore/color.py
@@ -13,6 +13,7 @@
Copyright (c) 2019-2021 by Eigenmiao. All Rights Reserved.
"""
+import re
import unittest
import numpy as np
@@ -544,18 +545,13 @@ def fmt_hec(cls, hec):
standard hex code (hec) color.
"""
- if not isinstance(hec, str):
- raise ValueError("expect hex code (hec) in str type: {}.".format(hec))
+ _hec = re.match(r"[0-9A-F]+", str(hec).upper())
- if len(hec) == 6:
- for stri in hec.upper():
- if stri not in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"):
- raise ValueError("expect code in hex type: {}.".format(hec))
+ if _hec and len(_hec[0]) == 6:
+ return _hec[0]
else:
- raise ValueError("expect hex code (hec) in length 6: {}.".format(hec))
-
- return hec.upper()
+ raise ValueError("expect hec color in hex type and length 6: {}.".format(hec))
@classmethod
def fmt_lab(cls, lab):
@@ -608,6 +604,73 @@ def fmt_cmyk(cls, cmyk):
else:
raise ValueError("expect cmyk color in length 4 and float: {}.".format(cmyk))
+ @classmethod
+ def findall_hec_lst(cls, hec):
+ """
+ Class method. Format item to standard hex code (hec) color.
+
+ Args:
+ hec (str): color item to be formated.
+
+ Returns:
+ standard hex code (hec) color.
+ """
+
+ _hec = re.findall(r"[0-9A-F]+", str(hec).upper())
+ _hec = ["" if len(i) < 6 else i[:6] for i in _hec]
+
+ while "" in _hec:
+ _hec.remove("")
+
+ return _hec
+
+ @classmethod
+ def stri2color(cls, stri):
+ """
+ Find the first possible color in string.
+
+ Args:
+ stri (str): rgb, hsv or hec color string.
+
+ Returns:
+ color.
+ """
+
+ _stri = re.findall(r"[0-9A-F\.]+", str(stri).upper())
+
+ if len(_stri) > 2:
+ _num = re.findall(r"[0-9\.]+", str(stri))
+
+ if len(_num) > 2:
+ _a, _b, _c = _num[:3]
+ _a = float(".".join(_a.split(".")[:2])) if "." in _a else int(_a)
+ _b = float(".".join(_b.split(".")[:2])) if "." in _b else int(_b)
+ _c = float(".".join(_c.split(".")[:2])) if "." in _c else int(_c)
+
+ if _a > 255:
+ return Color((_a, _b, _c), tp="hsv")
+
+ elif _b > 1.0 or _c > 1.0:
+ return Color((_a, _b, _c), tp="rgb")
+
+ elif isinstance(_a, float) or isinstance(_b, float) or isinstance(_c, float):
+ return Color((_a, _b, _c), tp="hsv")
+
+ else:
+ return Color((_a, _b, _c), tp="rgb")
+
+ else:
+ return None
+
+ elif len(_stri) > 0:
+ if len(_stri[0]) > 5:
+ return Color(Color.fmt_hec(_stri[0]), tp="hec")
+
+ return None
+
+ else:
+ return None
+
@classmethod
def rgb2hsv(cls, rgb):
"""
@@ -974,11 +1037,11 @@ def lab2rgb(cls, lab, white_ref=(95.047, 100.0, 108.883)):
rgb color.
"""
- lab = cls.fmt_lab(lab)
+ l, a, b = cls.fmt_lab(lab)
- y = (lab[0] + 16) / 116
- x = lab[1] / 500 + y
- z = y - lab[2] / 200
+ y = (l + 16) / 116
+ x = a / 500 + y
+ z = y - b / 200
normed_xyz = [i ** 3 if i > 0.008856 else (i - 16 / 116) / 7.787 for i in (x, y, z)]
xyz = np.array(normed_xyz) * white_ref / 100.0
diff --git a/src/main/python/ricore/export.py b/src/main/python/ricore/export.py
index c5ae45f..347cf04 100644
--- a/src/main/python/ricore/export.py
+++ b/src/main/python/ricore/export.py
@@ -13,64 +13,15 @@
Copyright (c) 2019-2021 by Eigenmiao. All Rights Reserved.
"""
-import re
import time
import struct
import swatch
from lxml import etree
from ricore.color import Color
from ricore.grid import gen_color_grid, gen_assit_color
+from ricore.check import fmt_name
-def fmt_num(stri):
- """
- Get num in string.
- """
-
- if isinstance(stri, (int, float)):
- return stri
-
- num_lst = [str(i) for i in range(10)]
- dot_num = 0
-
- for s in str(stri):
- if s == ".":
- dot_num = dot_num + 1
-
- elif s not in num_lst:
- dot_num = 2
- break
-
- if dot_num > 1:
- return None
-
- elif dot_num == 1:
- return float(str(stri))
-
- else:
- return int(str(stri))
-
-def fmt_name(name):
- """
- Delete prefix and endfix of name.
- """
-
- stri = str(name).lstrip().rstrip()
- stri_prefix = ("Rickrack ", "Rickrack-", "Rickrack:")
- stri_endfix = tuple([str(i) for i in range(10)] + ["-", ":", " "])
-
- while len(stri) >= 9 and stri[:9] in stri_prefix:
- stri = stri[9:].lstrip()
-
- while len(stri) >= 1 and stri[-1] in stri_endfix:
- stri = stri[:-1]
-
- if stri:
- return stri
-
- else:
- return "Rickrack"
-
def get_export_color_list(color_list, export_grid=False, max_len=65535):
"""
Get the export_color_list and export_cname_list for formatting aco, gpl, xml, txt or others.
@@ -443,21 +394,18 @@ def import_gpl(file_path):
items = line.split()
if len(items) >= 3:
- r = fmt_num(items[0])
- g = fmt_num(items[1])
- b = fmt_num(items[2])
-
- if isinstance(r, int) and isinstance(g, int) and isinstance(b, int):
- color = Color.rgb2hec((r, g, b))
+ color_text = ", ".join(items[:3])
+ color = Color.stri2color(color_text)
+ color = color.hec if color else "#FFFFFF"
- if len(items) > 3:
- name = " ".join(items[3:])
+ if len(items) > 3:
+ name = " ".join(items[3:])
- else:
- name = ""
+ else:
+ name = ""
- grid_list.append(color)
- name_list.append(name)
+ grid_list.append(color)
+ name_list.append(name)
return grid_list, name_list
@@ -508,52 +456,37 @@ def import_xml(file_path):
color_xmls = html.xpath("//color")
for color_xml in colour_xmls + color_xmls:
+ color_text = ""
color = None
r = color_xml.xpath("@red")
+ r = r if r else color_xml.xpath("@r")
g = color_xml.xpath("@green")
+ g = g if g else color_xml.xpath("@g")
b = color_xml.xpath("@blue")
+ b = b if b else color_xml.xpath("@b")
- if not (r and g and b):
- r = color_xml.xpath("@r")
- g = color_xml.xpath("@g")
- b = color_xml.xpath("@b")
-
- if r and g and b:
- r = fmt_num(r[0])
- g = fmt_num(g[0])
- b = fmt_num(b[0])
-
- if isinstance(r, (int, float)) and isinstance(g, (int, float)) and isinstance(b, (int, float)):
- color = Color.rgb2hec((r, g, b))
-
- else:
- rgb = color_xml.xpath("@rgb")
-
- if rgb:
- rgb = re.split(r"[[\]\(\),;:#]", rgb[0])
-
- while "" in rgb:
- rgb.remove("")
+ h = color_xml.xpath("@hue")
+ h = h if h else color_xml.xpath("@h")
+ s = color_xml.xpath("@saturation")
+ s = s if s else color_xml.xpath("@s")
+ v = color_xml.xpath("@value")
+ v = v if v else color_xml.xpath("@v")
- if len(rgb[0]) == 6:
- is_a_hec = True
+ rgb = color_xml.xpath("@rgb")
- for stri in rgb[0].upper():
- if stri not in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"):
- is_a_hec = False
- break
+ if r and g and b:
+ color_text = "{}, {}, {}".format(r[0], g[0], b[0])
- if is_a_hec:
- color = rgb[0].upper()
+ elif h and s and v:
+ color_text = "{}, {}, {}".format(h[0], s[0], v[0])
- if len(rgb) >= 3:
- r = fmt_num(rgb[0])
- g = fmt_num(rgb[1])
- b = fmt_num(rgb[2])
+ elif rgb:
+ color_text = rgb[0]
- if isinstance(r, (int, float)) and isinstance(g, (int, float)) and isinstance(b, (int, float)):
- color = Color.rgb2hec((r, g, b))
+ if color_text:
+ color = Color.stri2color(color_text)
+ color = color.hec if color else "#FFFFFF"
if color:
name = color_xml.xpath("@name")
@@ -654,21 +587,7 @@ def import_text(file_path):
with open(file_path, "r", encoding="utf-8") as df:
data = df.read()
- for line in data.split("\n"):
- items = line.split()
-
- for item in items:
- if item[0] == "#" and len(item) == 7:
- is_a_hec = True
-
- for stri in item[1:].upper():
- if stri not in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"):
- is_a_hec = False
- break
-
- if is_a_hec:
- grid_list.append(item[1:].upper())
-
+ grid_list = Color.findall_hec_lst(data)
name_list = ["",] * len(grid_list)
return grid_list, name_list
diff --git a/src/main/python/ricore/grid.py b/src/main/python/ricore/grid.py
index e6cf747..22893d9 100644
--- a/src/main/python/ricore/grid.py
+++ b/src/main/python/ricore/grid.py
@@ -294,25 +294,10 @@ def norm_grid_list(grid_list):
name_tran = grid_list[1]
for grid_item_idx in range(len(grid_tran)):
- grid_stri = str(grid_tran[grid_item_idx]).upper()
- not_a_hec = False
+ color = Color.stri2color(grid_tran[grid_item_idx])
- if len(grid_stri) == 6:
- for stri in grid_stri:
- if stri not in ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"):
- not_a_hec = True
-
- break
-
- else:
- not_a_hec = True
-
- if not_a_hec:
- cr_colr_list.append("FFFFFF")
- cr_name_list.append("")
-
- else:
- cr_colr_list.append(grid_stri)
+ if color:
+ cr_colr_list.append(color.hec)
if len(name_tran) > grid_item_idx:
name_stri = re.split(r"[\v\a\f\n\r\t]", str(name_tran[grid_item_idx]))
@@ -331,6 +316,10 @@ def norm_grid_list(grid_list):
else:
cr_name_list.append("")
+ else:
+ cr_colr_list.append("FFFFFF")
+ cr_name_list.append("")
+
cr_grid_list = [cr_colr_list, cr_name_list]
return cr_grid_list
@@ -414,88 +403,6 @@ def norm_grid_values(grid_values):
return cr_grid_values
-def norm_im_time(im_time):
- """
- Verify and normalize value im_time.
-
- Args:
- im_time (tuple or list): default value.
-
- Returns:
- corrected time.
- """
-
- current_time = time.time()
-
- init_time = 0
- modify_time = 0
-
- if isinstance(im_time, (tuple, list)):
- if len(im_time) > 1:
- init_time, modify_time = im_time[:2]
-
- else:
- init_time = im_time[0]
- modify_time = 0
-
- elif isinstance(im_time, (float, int)):
- init_time = im_time
- modify_time = 0
-
- else:
- init_time = 0
- modify_time = 0
-
- if isinstance(init_time, (int, float)):
- init_time = float(init_time)
- else:
- init_time = 0
-
- if isinstance(modify_time, (int, float)):
- modify_time = float(modify_time)
- else:
- modify_time = 0
-
- init_time = 0 if init_time < 0 else init_time
- init_time = current_time if init_time > current_time else init_time
-
- modify_time = 0 if modify_time < 0 else modify_time
- modify_time = current_time if modify_time > current_time else modify_time
-
- modify_time = init_time if modify_time < init_time else modify_time
-
- cr_time = (init_time, modify_time)
-
- return cr_time
-
-def snap_point(pt, wid):
- """
- Snap point on special locations, such as (1, 1) or (0.5, 0.5).
-
- Args:
- pt (tuple or list): point before snap.
- wid (float): box width (or half widh if snap (0.5, 0.5)).
-
- Returns:
- point after snap.
- """
-
- x, y = pt
-
- if (x % wid) < wid * 0.15:
- x = (x // wid) * wid
-
- elif (x % wid) > wid * 0.85:
- x = (x // wid + 1) * wid
-
- if (y % wid) < wid * 0.15:
- y = (y // wid) * wid
-
- elif (y % wid) > wid * 0.85:
- y = (y // wid + 1) * wid
-
- return [x, y]
-
def gen_assit_color(curr_color, assit_h, assit_s, assit_v, relativity):
"""
Generate assit color relative to current color.
diff --git a/src/main/python/ricore/transpt.py b/src/main/python/ricore/transpt.py
index 8cf619e..b552699 100644
--- a/src/main/python/ricore/transpt.py
+++ b/src/main/python/ricore/transpt.py
@@ -142,3 +142,31 @@ def get_link_tag(box):
line_end = np.array((shift_box[0] + shift_box[2] * 3 / 4, shift_box[1] + shift_box[3] / 2))
return square_left, square_right, shift, line_start, line_end
+
+def snap_point(pt, wid):
+ """
+ Snap point on special locations, such as (1, 1) or (0.5, 0.5).
+
+ Args:
+ pt (tuple or list): point before snap.
+ wid (float): box width (or half widh if snap (0.5, 0.5)).
+
+ Returns:
+ point after snap.
+ """
+
+ x, y = pt
+
+ if (x % wid) < wid * 0.15:
+ x = (x // wid) * wid
+
+ elif (x % wid) > wid * 0.85:
+ x = (x // wid + 1) * wid
+
+ if (y % wid) < wid * 0.15:
+ y = (y // wid) * wid
+
+ elif (y % wid) > wid * 0.85:
+ y = (y // wid + 1) * wid
+
+ return [x, y]
diff --git a/src/main/python/wgets/board.py b/src/main/python/wgets/board.py
index 9851972..22dab45 100644
--- a/src/main/python/wgets/board.py
+++ b/src/main/python/wgets/board.py
@@ -18,13 +18,15 @@
import json
import time
import numpy as np
-from PyQt5.QtWidgets import QWidget, QShortcut, QMenu, QAction, QLabel, QDialog, QGridLayout, QPushButton, QDialogButtonBox, QColorDialog, QApplication, QMessageBox
+from PIL import ImageQt
+from PIL.PpmImagePlugin import PpmImageFile
+from PyQt5.QtWidgets import QWidget, QShortcut, QMenu, QAction, QLabel, QDialog, QGridLayout, QPushButton, QDialogButtonBox, QColorDialog, QApplication, QMessageBox, QFileDialog
from PyQt5.QtCore import Qt, pyqtSignal, QCoreApplication, QPoint, QMimeData, QUrl
from PyQt5.QtGui import QPainter, QPen, QBrush, QColor, QPixmap, QImage, QCursor, QKeySequence, QIcon, QDrag
from cguis.design.box_dialog import Ui_BoxDialog
from ricore.color import Color
-from ricore.transpt import get_outer_box, get_link_tag, rotate_point
-from ricore.grid import gen_color_grid, norm_grid_locations, norm_grid_values, snap_point, gen_assit_color
+from ricore.transpt import get_outer_box, get_link_tag, rotate_point, snap_point
+from ricore.grid import gen_color_grid, norm_grid_locations, norm_grid_values, gen_assit_color
from ricore.export import export_list
@@ -280,53 +282,16 @@ def mouseDoubleClickEvent(self, event):
# ---------- ---------- ---------- Public Funcs ---------- ---------- ---------- #
def change_color(self, hec_color):
- hec_value = None
+ """
+ Find colors in info box.
+ """
- try:
- hec_value = Color.fmt_hec(str(hec_color)[-6:])
+ color = Color.stri2color(hec_color)
- except Exception as err:
- pass
-
- if hec_value:
- self.color = Color(hec_value, tp="hec")
+ if color:
+ self.color = color
self.update()
- else:
- list_color = re.split(r"[\v\a\f\n\r\t\[\]\(\),;:#]", str(hec_color.replace("【", "[").replace("】", "]").replace("(", "(").replace(")", ")").replace("。", ".").replace(",", ",").replace("、", ",").replace(";", ";").replace(":", ":")))
-
- while "" in list_color:
- list_color.remove("")
-
- if len(list_color) >= 3:
- list_color = list_color[-3:]
-
- if "." in list_color[0] or "." in list_color[1] or "." in list_color[2]:
- hsv_color = None
-
- try:
- hsv_color = Color.fmt_hsv([float(x) for x in list_color])
-
- except Exception as err:
- pass
-
- if isinstance(hsv_color, np.ndarray):
- self.color = Color(hsv_color, tp="hsv")
- self.update()
-
- else:
- rgb_color = None
-
- try:
- rgb_color = Color.fmt_rgb([int(x) for x in list_color])
-
- except Exception as err:
- pass
-
- if isinstance(rgb_color, np.ndarray):
- self.color = Color(rgb_color, tp="rgb")
- self.update()
-
class Board(QWidget):
"""
@@ -342,6 +307,7 @@ class Board(QWidget):
ps_assit_pt_changed = pyqtSignal(bool)
ps_history_backup = pyqtSignal(bool)
ps_undo = pyqtSignal(bool)
+ ps_transfer_image = pyqtSignal(PpmImageFile)
def __init__(self, wget, args):
"""
@@ -727,6 +693,7 @@ def mousePressEvent(self, event):
if event.button() == Qt.LeftButton:
# main points.
if (self._args.press_move and not self._last_moving and not already_accept_assi and self._cs_box[0] < point[0] < self._cs_box[0] + self._cs_box[2] and self._cs_box[1] < point[1] < self._cs_box[1] + self._cs_box[3]) or already_accept_main:
+ """
loc = [(point[0] - self._cs_box[0]) / self._cs_wid, (point[1] - self._cs_box[1]) / self._cs_wid]
loc = snap_point(loc, 0.5 / self._args.sys_grid_values["col"])
loc[0] = 0.0 if loc[0] < 0.0 else loc[0]
@@ -735,6 +702,7 @@ def mousePressEvent(self, event):
loc[1] = 1.0 if loc[1] > 1.0 else loc[1]
self._args.sys_grid_locations[self._args.sys_activated_idx] = tuple(loc)
+ """
self._moving_maintp = True
self._last_moving = 0
@@ -744,6 +712,7 @@ def mousePressEvent(self, event):
# assit points.
elif self._args.sys_grid_assitlocs[self._args.sys_activated_idx] and (self._args.press_move and self._last_moving and not already_accept_main and self._cs_box[0] < point[0] < self._cs_box[0] + self._cs_box[2] and self._cs_box[1] < point[1] < self._cs_box[1] + self._cs_box[3]) or already_accept_assi:
+ """
loc = [(point[0] - self._cs_box[0]) / self._cs_wid - self._args.sys_grid_locations[self._args.sys_activated_idx][0], (point[1] - self._cs_box[1]) / self._cs_wid - self._args.sys_grid_locations[self._args.sys_activated_idx][1]]
loc = snap_point(loc, 0.5 / self._args.sys_grid_values["col"])
loc[0] = -1.0 if loc[0] < -1.0 else loc[0]
@@ -753,6 +722,7 @@ def mousePressEvent(self, event):
self._args.sys_grid_assitlocs[self._args.sys_activated_idx][self._args.sys_activated_assit_idx][0] = loc[0]
self._args.sys_grid_assitlocs[self._args.sys_activated_idx][self._args.sys_activated_assit_idx][1] = loc[1]
+ """
self._moving_assitp = True
self._last_moving = 1
@@ -959,7 +929,7 @@ def zoom(self, ratio):
if not self.isVisible():
return
- if self._args.rev_direct:
+ if True: # self._args.rev_direct:
if ratio > 1 and self._args.sys_grid_values["col"] >= 2:
self._args.sys_grid_values["col"] = int(self._args.sys_grid_values["col"] - 1)
@@ -1387,6 +1357,45 @@ def reset_locations(self):
self.ps_history_backup.emit(True)
self.update()
+ def freeze_image(self, value):
+ """
+ Freeze current image.
+ """
+
+ if not self.isVisible():
+ return
+
+ grid_img = QImage(self._color_grid, self._color_grid.shape[1], self._color_grid.shape[0], self._color_grid.shape[1] * 3, QImage.Format_RGB888)
+ grid_img = grid_img.scaled(self._cs_box[2], self._cs_box[3], Qt.KeepAspectRatio)
+ grid_img = ImageQt.fromqimage(grid_img)
+
+ self.ps_transfer_image.emit(grid_img)
+
+ def print_image(self, value):
+ """
+ Exec print image.
+ """
+
+ if not self.isVisible():
+ return
+
+ grid_img = QImage(self._color_grid, self._color_grid.shape[1], self._color_grid.shape[0], self._color_grid.shape[1] * 3, QImage.Format_RGB888)
+ grid_img = grid_img.scaled(self._cs_box[2], self._cs_box[3], Qt.KeepAspectRatio)
+
+ name = "{}".format(time.strftime("Rickrack_Image_%Y_%m_%d.png", time.localtime()))
+
+ cb_filter = "{} (*.png *.bmp *.jpg *.jpeg *.tif *.tiff *.webp);; {} (*.png);; {} (*.bmp);; {} (*.jpg *.jpeg);; {} (*.tif *.tiff);; {} (*.webp)".format(*self._extend_descs)
+ cb_file = QFileDialog.getSaveFileName(None, self._open_descs[2], os.sep.join((self._args.usr_image, name)), filter=cb_filter)
+
+ if cb_file[0]:
+ self._args.usr_image = os.path.dirname(os.path.abspath(cb_file[0]))
+
+ else:
+ # closed without open a file.
+ return
+
+ grid_img.save(cb_file[0])
+
def clipboard_in(self):
"""
Load set from clipboard. Sync to wheel.py. May exist difference.
@@ -1529,6 +1538,16 @@ def create_menu(self):
self._action_copy_img.triggered.connect(self.clipboard_img)
self._menu.addAction(self._action_copy_img)
+ # _translate("Board", "Freeze Image"), # 28
+ # _translate("Board", "Print Image"), # 29
+ self._action_freeze_img = QAction(self)
+ self._action_freeze_img.triggered.connect(self.freeze_image)
+ self._menu.addAction(self._action_freeze_img)
+
+ self._action_print_img = QAction(self)
+ self._action_print_img.triggered.connect(self.print_image)
+ self._menu.addAction(self._action_print_img)
+
# _translate("Board", "Zoom In"), # 8
# _translate("Board", "Zoom Out"), # 9
self._action_zoom_in = QAction(self)
@@ -1917,6 +1936,11 @@ def update_action_text(self):
else:
self._action_hide_pt.setText(self._action_descs[26])
+ # _translate("Board", "Freeze Image"), # 28
+ # _translate("Board", "Print Image"), # 29
+ self._action_freeze_img.setText(self._action_descs[28])
+ self._action_print_img.setText(self._action_descs[29])
+
def update_text(self):
self.update_action_text()
@@ -1957,10 +1981,8 @@ def _func_tr_(self):
_translate("Board", "Make Ref Board"), # 25
_translate("Board", "Show Points"), # 26
_translate("Board", "Hide Points"), # 27
- )
-
- self._recommend_descs = (
- _translate("Rickrack", "{} ({})"),
+ _translate("Image", "Freeze Image"), # 28
+ _translate("Image", "Print Image"), # 29
)
self._tip_descs = (
@@ -1979,3 +2001,19 @@ def _func_tr_(self):
_translate("Info", "The selected color box will be removed from board."),
_translate("Info", "The selected assistant point will be removed from board."),
)
+
+ self._open_descs = (
+ _translate("Image", "Double click here to open an image."),
+ _translate("Image", "Open"),
+ _translate("Image", "Print"),
+ _translate("Image", "Cover"),
+ )
+
+ self._extend_descs = (
+ _translate("Image", "All Acceptable Images"),
+ _translate("Image", "PNG Image"),
+ _translate("Image", "BMP Image"),
+ _translate("Image", "JPG Image"),
+ _translate("Image", "TIF Image"),
+ _translate("Image", "WEBP Image"),
+ )
diff --git a/src/main/python/wgets/cube.py b/src/main/python/wgets/cube.py
index d34b6f0..affa8f0 100644
--- a/src/main/python/wgets/cube.py
+++ b/src/main/python/wgets/cube.py
@@ -284,21 +284,27 @@ def __init__(self, wget, args):
scroll_horizontal_layout.addWidget(self._cubes[idx])
self._cubes[idx].square.ps_color_changed.connect(lambda x: self.update_color())
self._cubes[idx].square.ps_color_changed.connect(lambda x: self.ps_history_backup.emit(True))
- self._cubes[idx].square.ps_index_changed.connect(lambda x: self.update_index())
+ self._cubes[idx].square.ps_index_changed.connect(lambda x: self.update_color())
for ctp in ("r", "g", "b"):
+ # horizontal slider.
obj = getattr(self._cubes[idx], "hs_rgb_{}".format(ctp))
obj.valueChanged.connect(self.modify_color(idx, "direct", ctp))
+
+ # spin box.
obj = getattr(self._cubes[idx], "sp_rgb_{}".format(ctp))
obj.valueChanged.connect(self.modify_color(idx, "frdire", ctp))
for ctp in ("h", "s", "v"):
+ # horizontal slider.
obj = getattr(self._cubes[idx], "hs_hsv_{}".format(ctp))
obj.valueChanged.connect(self.modify_color(idx, "indire", ctp))
+
+ # double spin box.
obj = getattr(self._cubes[idx], "dp_hsv_{}".format(ctp))
obj.valueChanged.connect(self.modify_color(idx, "frdire", ctp))
- self._cubes[idx].le_hec.textChanged.connect(self.modify_color(idx, "direct", "hec"))
+ self._cubes[idx].le_hec.textChanged.connect(self.modify_color(idx, "frdire", "hec"))
self.modify_box_visibility()
@@ -344,20 +350,23 @@ def _func_(value):
return
if ctp == "hec":
- try:
- value = Color.fmt_hec(value)
+ value = Color.stri2color(value)
- except Exception as err:
- return
+ if not value:
+ return
self._updated_colors = True
color = Color(self._args.sys_color_set[idx], tp="color", overflow=self._args.sys_color_set.get_overflow())
- if kword == "direct" or kword == "frdire":
- color.setti(value, ctp)
+ if ctp == "hec":
+ color.setti(value, tp="color")
else:
- color.setti(value / 1E3, ctp)
+ if kword == "direct" or kword == "frdire":
+ color.setti(value, ctp)
+
+ else:
+ color.setti(value / 1E3, ctp)
self._args.sys_color_set.modify(self._args.hm_rule, idx, color)
@@ -379,23 +388,37 @@ def update_color(self, skip_dp=None):
self._updated_colors = True
for lc_idx in range(5):
+ if lc_idx == self._args.sys_activated_idx and self._args.sys_activated_assit_idx >= 0:
+ curr_color = gen_assit_color(self._args.sys_color_set[lc_idx], *self._args.sys_grid_assitlocs[lc_idx][self._args.sys_activated_assit_idx][2:6])
+
+ else:
+ curr_color = self._args.sys_color_set[lc_idx]
+
+ curr_hec = curr_color.getti("hec")
+ curr_h, curr_s, curr_v = curr_color.getti("hsv")
+
+ # skip same color. no need to update.
+ if curr_hec == self._cubes[lc_idx].le_hec.text() and curr_s > 0.01 and 0.99 > curr_v > 0.01:
+ continue
+
+ if not (skip_dp and skip_dp[0] == lc_idx and skip_dp[1] == "hec"):
+ self._cubes[lc_idx].le_hec.setText(curr_hec)
+
for lc_ctp in ("r", "g", "b"):
obj = getattr(self._cubes[lc_idx], "hs_rgb_{}".format(lc_ctp))
- obj.setValue(self._args.sys_color_set[lc_idx].getti(lc_ctp))
+ obj.setValue(curr_color.getti(lc_ctp))
if not (skip_dp and skip_dp[0] == lc_idx and skip_dp[1] == lc_ctp):
obj = getattr(self._cubes[lc_idx], "sp_rgb_{}".format(lc_ctp))
- obj.setValue(self._args.sys_color_set[lc_idx].getti(lc_ctp))
+ obj.setValue(curr_color.getti(lc_ctp))
for lc_ctp in ("h", "s", "v"):
obj = getattr(self._cubes[lc_idx], "hs_hsv_{}".format(lc_ctp))
- obj.setValue(self._args.sys_color_set[lc_idx].getti(lc_ctp) * 1E3)
+ obj.setValue(vars()["curr_{}".format(lc_ctp)] * 1E3)
if not (skip_dp and skip_dp[0] == lc_idx and skip_dp[1] == lc_ctp):
obj = getattr(self._cubes[lc_idx], "dp_hsv_{}".format(lc_ctp))
- obj.setValue(self._args.sys_color_set[lc_idx].getti(lc_ctp))
-
- self._cubes[lc_idx].le_hec.setText(self._args.sys_color_set[lc_idx].getti("hec"))
+ obj.setValue(vars()["curr_{}".format(lc_ctp)])
self.update_index()
@@ -403,7 +426,7 @@ def update_color(self, skip_dp=None):
def update_index(self):
"""
- Update color activated index.
+ Update color activated index. Undertake func update_color.
"""
for lc_idx in range(5):
@@ -416,13 +439,13 @@ def modify_rule(self):
Modify stored color set by rule selection.
"""
- if True in [bool(i) for i in self._args.sys_grid_assitlocs]:
- self._args.sys_grid_assitlocs = [[], [], [], [], []]
- self._args.sys_assit_color_locs = [[], [], [], [], []]
- self._args.sys_activated_assit_idx = -1
+ """
+ self._args.sys_grid_assitlocs = [[], [], [], [], []]
+ self._args.sys_assit_color_locs = [[], [], [], [], []]
+ self._args.sys_activated_assit_idx = -1
+ """
- else:
- self._args.sys_color_set.create(self._args.hm_rule)
+ self._args.sys_color_set.create(self._args.hm_rule)
self.update_color()
diff --git a/src/main/python/wgets/depot.py b/src/main/python/wgets/depot.py
index 9bc61ae..044d76f 100644
--- a/src/main/python/wgets/depot.py
+++ b/src/main/python/wgets/depot.py
@@ -15,7 +15,6 @@
import re
import os
-import sys
import json
import time
import numpy as np
@@ -27,8 +26,8 @@
from ricore.color import FakeColor, Color
from ricore.export import export_list
from ricore.transpt import get_link_tag
-from ricore.grid import norm_grid_locations, norm_grid_list, norm_grid_values, norm_im_time
-from ricore.check import check_image_desc
+from ricore.grid import norm_grid_locations, norm_grid_list, norm_grid_values
+from ricore.check import check_image_desc, fmt_im_time
class Info(QDialog, Ui_InfoDialog):
@@ -335,7 +334,7 @@ def __init__(self, wget, args, hsv_set=[], hm_rule="", name="", desc="", cr_time
self.name = name_stri
self.desc = desc_stri
- self.cr_time = norm_im_time(cr_time)
+ self.cr_time = fmt_im_time(cr_time)
self.update_colors(hsv_set, hm_rule, grid_locations, grid_assitlocs, grid_list, grid_values, update_time=False)
@@ -364,7 +363,7 @@ def update_colors(self, hsv_set, hm_rule, grid_locations, grid_assitlocs, grid_l
self.grid_values = {}
if update_time:
- self.cr_time = norm_im_time((self.cr_time[0], time.time()))
+ self.cr_time = fmt_im_time((self.cr_time[0], time.time()))
# ---------- ---------- ---------- Paint Funcs ---------- ---------- ---------- #
@@ -952,7 +951,7 @@ def zoom(self, ratio):
stab_column = self._args.stab_column
- if self._args.rev_direct:
+ if True: # self._args.rev_direct:
if ratio > 1:
stab_column = stab_column - 1
@@ -1232,10 +1231,8 @@ def attach_set(self, color_list=None, activate_list=True, location_idx=-1):
unit_cell = UnitCell(self._scroll_contents, self._args, hsv_set, color_list[1], color_list[2], color_list[3], color_list[4], color_list[5], color_list[6], color_list[7], color_list[8])
else:
- atc_name = ""
- atc_desc = ""
hsv_set = tuple(self._args.sys_color_set[i].hsv for i in range(5))
- unit_cell = UnitCell(self._scroll_contents, self._args, hsv_set, self._args.hm_rule, atc_name, atc_desc, (time.time(), time.time()), self._args.sys_grid_locations, self._args.sys_grid_assitlocs, self._args.sys_grid_list, self._args.sys_grid_values)
+ unit_cell = UnitCell(self._scroll_contents, self._args, hsv_set, self._args.hm_rule, "", "", (time.time(), time.time()), self._args.sys_grid_locations, self._args.sys_grid_assitlocs, self._args.sys_grid_list, self._args.sys_grid_values)
self._scroll_grid_layout.addWidget(unit_cell)
diff --git a/src/main/python/wgets/image.py b/src/main/python/wgets/image.py
index 3ae6a5d..e4a90ae 100644
--- a/src/main/python/wgets/image.py
+++ b/src/main/python/wgets/image.py
@@ -17,6 +17,7 @@
import sys
import time
import numpy as np
+from PIL import ImageQt
from PIL import Image as PImage
from PyQt5.QtWidgets import QWidget, QLabel, QProgressBar, QMessageBox, QFileDialog, QShortcut, QMenu, QAction, QApplication
from PyQt5.QtCore import Qt, pyqtSignal, QCoreApplication, QRect, QPoint, QMimeData
@@ -520,6 +521,7 @@ def mousePressEvent(self, event):
# select.
if event.button() == Qt.LeftButton and (((self._args.press_move or select_main_color or select_assit_colors) and self._resized_img_pos[0] < point[0] < self._resized_img_pos[0] + self._resized_img_pos[2] and self._resized_img_pos[1] < point[1] < self._resized_img_pos[1] + self._resized_img_pos[3]) or already_accept):
+ """
loc = [(point[0] - self._resized_img_pos[0]) / self._resized_img_pos[2], (point[1] - self._resized_img_pos[1]) / self._resized_img_pos[3]]
loc[0] = 0.0 if loc[0] < 0.0 else loc[0]
loc[0] = 1.0 if loc[0] > 1.0 else loc[0]
@@ -533,6 +535,7 @@ def mousePressEvent(self, event):
self._args.sys_assit_color_locs[self._args.sys_activated_idx][self._args.sys_activated_assit_idx] = tuple(loc)
self.modify_color_loc()
+ """
self._locating_colors = True
@@ -866,12 +869,12 @@ def open_image_dialog(self):
# closed without open a file.
return
- def open_image(self, image, script="", with_full_locs=[]):
+ def open_image(self, image, script="", with_full_locs=[], direct=False):
"""
Open a image.
"""
- if isinstance(script, tuple) and (not self.isVisible()):
+ if isinstance(script, tuple) and (not self.isVisible() or direct):
return
if script and (not self._image3c.img_data):
@@ -886,12 +889,16 @@ def open_image(self, image, script="", with_full_locs=[]):
return
if not isinstance(script, tuple):
- try:
- img_data = PImage.open(image)
+ if direct:
+ img_data = image
- except Exception as err:
- self.warning(self._image_errs[4] + "\n{}\n{}".format(self._image_errs[8], err))
- return
+ else:
+ try:
+ img_data = PImage.open(image)
+
+ except Exception as err:
+ self.warning(self._image_errs[4] + "\n{}\n{}".format(self._image_errs[8], err))
+ return
self._image3c.img_data = img_data
self._args.sys_image_url = image
@@ -1373,10 +1380,10 @@ def freeze_image(self, value):
self.warning(self._image_errs[1])
return
- load_image = self._image3c.save_load_data(self._image3c.display)
+ load_image = ImageQt.fromqimage(self._image3c.display)
if load_image:
- self.open_image(load_image)
+ self.open_image(load_image, direct=True)
else:
self.warning(self._image_errs[5])
@@ -1494,6 +1501,16 @@ def create_menu(self):
self._action_copy_img.triggered.connect(self.clipboard_img)
self._menu.addAction(self._action_copy_img)
+ # _translate("Board", "Freeze Image"), # 8
+ # _translate("Board", "Print Image"), # 9
+ self._action_freeze_img = QAction(self)
+ self._action_freeze_img.triggered.connect(self.freeze_image)
+ self._menu.addAction(self._action_freeze_img)
+
+ self._action_print_img = QAction(self)
+ self._action_print_img.triggered.connect(self.print_image)
+ self._menu.addAction(self._action_print_img)
+
# _translate("Image", "Zoom In"), # 6
# _translate("Image", "Zoom Out"), # 7
self._action_zoom_in = QAction(self)
@@ -1516,12 +1533,16 @@ def show_menu(self):
self._action_copy_img.setVisible(True)
self._action_zoom_in.setVisible(True)
self._action_zoom_out.setVisible(True)
+ self._action_freeze_img.setVisible(True)
+ self._action_print_img.setVisible(True)
else:
self._action_reset.setVisible(False)
self._action_copy_img.setVisible(False)
self._action_zoom_in.setVisible(False)
self._action_zoom_out.setVisible(False)
+ self._action_freeze_img.setVisible(False)
+ self._action_print_img.setVisible(False)
self._menu.exec_(QCursor.pos())
@@ -1579,6 +1600,11 @@ def update_action_text(self):
self._action_zoom_in.setText(self._action_descs[6])
self._action_zoom_out.setText(self._action_descs[7])
+ # _translate("Board", "Freeze Image"), # 8
+ # _translate("Board", "Print Image"), # 9
+ self._action_freeze_img.setText(self._action_descs[8])
+ self._action_print_img.setText(self._action_descs[9])
+
def _func_tr_(self):
_translate = QCoreApplication.translate
@@ -1591,6 +1617,8 @@ def _func_tr_(self):
_translate("Board", "Reset"), # 5
_translate("Board", "Zoom In"), # 6
_translate("Board", "Zoom Out"), # 7
+ _translate("Image", "Freeze Image"), # 8
+ _translate("Image", "Print Image"), # 9
)
self._open_descs = (
diff --git a/src/main/python/wgets/operation.py b/src/main/python/wgets/operation.py
index 4ceee2b..64f1272 100644
--- a/src/main/python/wgets/operation.py
+++ b/src/main/python/wgets/operation.py
@@ -20,7 +20,8 @@
from PyQt5.QtWidgets import QWidget, QPushButton, QGridLayout, QScrollArea, QFrame, QGroupBox, QSpacerItem, QSizePolicy, QFileDialog, QMessageBox
from PyQt5.QtCore import Qt, pyqtSignal, QCoreApplication, QSize
from ricore.export import export_list, export_text, export_swatch, export_ase, export_gpl, export_xml, import_text, import_swatch, import_ase, import_gpl, import_xml
-from ricore.grid import norm_grid_locations, norm_grid_list, norm_grid_values, norm_im_time
+from ricore.grid import norm_grid_locations, norm_grid_list, norm_grid_values
+from ricore.check import fmt_im_time
from ricore.color import Color
@@ -174,13 +175,13 @@ def exec_open(self, value):
self.dp_open(cb_file[0])
- def dp_open(self, depot_file, direct_dict=False):
+ def dp_open(self, depot_file, direct_dict=False, dp_path=""):
"""
Open a color depot file.
"""
color_dict = {}
- curr_path = ""
+ curr_path = str(dp_path)
if direct_dict:
color_dict = depot_file
@@ -188,17 +189,17 @@ def dp_open(self, depot_file, direct_dict=False):
else:
curr_path = os.path.dirname(depot_file)
- with open(depot_file, "r", encoding="utf-8") as f:
- try:
+ try:
+ with open(depot_file, "r", encoding="utf-8") as f:
color_dict = json.load(f)
- except Exception as err:
- self.warning(self._operation_errs[1] + "\n{}\n{}".format(self._operation_errs[17], err))
- return
+ except Exception as err:
+ self.warning(self._operation_errs[1] + "\n{}\n{}".format(self._operation_errs[17], err))
+ return
- if not isinstance(color_dict, dict):
- self.warning(self._operation_errs[2])
- return
+ if not isinstance(color_dict, dict):
+ self.warning(self._operation_errs[2])
+ return
if "version" in color_dict:
vid = self._args.check_version_d(color_dict["version"])
@@ -227,95 +228,127 @@ def dp_open(self, depot_file, direct_dict=False):
self.warning(self._operation_errs[12] + "\n{}\n{}".format(self._operation_errs[17], "type; palettes"))
return
- color_list = []
finished_errs = []
+ color_list = []
- try:
- for color_idx in range(len(color_palettes)):
- color = color_palettes[color_idx]
- hsv_set = []
+ if not isinstance(color_palettes, (tuple, list)):
+ self.warning(self._operation_errs[13] + "\n{}\n{}".format(self._operation_errs[17], "\"{}\" is not a list.".format(str(color_palettes)[:100] + " ...")))
+ return
- try:
- for i in range(5):
- if "hsv" in color["color_{}".format(i)]:
- hsv_set.append(tuple(Color.fmt_hsv(color["color_{}".format(i)]["hsv"]).tolist()))
+ for color_idx in range(len(color_palettes)):
+ color = color_palettes[color_idx]
+ hsv_set = []
+ broken_errs = []
- elif "rgb" in color["color_{}".format(i)]:
- hsv_set.append(tuple(Color.rgb2hsv(color["color_{}".format(i)]["rgb"]).tolist()))
+ if not isinstance(color, dict):
+ broken_errs.append("[id {}] {}".format(color_idx + 1, "\"{}\" is not a dict.".format(str(color)[25] + " ...")))
- elif "hex_code" in color["color_{}".format(i)]:
- hsv_set.append(tuple(Color.hec2hsv(color["color_{}".format(i)]["hex_code"]).tolist()))
+ if broken_errs:
+ finished_errs += list(broken_errs)
+ continue
- elif "hex code" in color["color_{}".format(i)]:
- hsv_set.append(tuple(Color.hec2hsv(color["color_{}".format(i)]["hex code"]).tolist()))
+ for i in range(5):
+ if broken_errs:
+ break
- else:
- finished_errs.append("[id {}] hsv value is not found.".format(color_idx + 1))
+ if "color_{}".format(i) in color:
+ hsv_tuple = (0.0, 0.0, 1.0)
- if "name" in color:
- cr_name = str(color["name"])
+ if "hsv" in color["color_{}".format(i)]:
+ try:
+ hsv_tuple = Color.fmt_hsv(color["color_{}".format(i)]["hsv"]).tolist()
- else:
- cr_name = ""
+ except Exception as err:
+ broken_errs.append("[id {}] {}".format(color_idx + 1, str(err)))
- if "desc" in color:
- cr_desc = str(color["desc"])
- cr_desc = cr_desc.replace("$curr_path$", curr_path)
- cr_desc = cr_desc.replace("$os_sep$", os.sep)
+ elif "rgb" in color["color_{}".format(i)]:
+ try:
+ hsv_tuple = Color.rgb2hsv(color["color_{}".format(i)]["rgb"]).tolist()
- else:
- cr_desc = ""
+ except Exception as err:
+ broken_errs.append("[id {}] {}".format(color_idx + 1, str(err)))
- if "time" in color:
- cr_time = norm_im_time(color["time"])
+ elif "hex_code" in color["color_{}".format(i)]:
+ try:
+ hsv_tuple = Color.hec2hsv(color["color_{}".format(i)]["hex_code"]).tolist()
- else:
- cr_time = (0, 0)
+ except Exception as err:
+ broken_errs.append("[id {}] {}".format(color_idx + 1, str(err)))
+
+ elif "hex code" in color["color_{}".format(i)]:
+ try:
+ hsv_tuple = Color.hec2hsv(color["color_{}".format(i)]["hex code"]).tolist()
- if "grid_locations" in color and "grid_assitlocs" in color:
- grid_locations = color["grid_locations"]
- grid_assitlocs = color["grid_assitlocs"]
+ except Exception as err:
+ broken_errs.append("[id {}] {}".format(color_idx + 1, str(err)))
else:
- grid_locations = []
- grid_assitlocs = []
+ broken_errs.append("[id {}] hsv value is not found.".format(color_idx + 1))
- if "grid_list" in color:
- grid_list = color["grid_list"]
+ hsv_set.append(tuple(hsv_tuple))
- else:
- grid_list = []
+ else:
+ broken_errs.append("[id {}] {}".format(color_idx + 1, "\"color_{}\" is not found in color dict.".format(i)))
- if "grid_values" in color:
- grid_values = color["grid_values"]
+ if broken_errs:
+ finished_errs += list(broken_errs)
+ continue
- else:
- grid_values = {}
+ if "name" in color:
+ cr_name = str(color["name"])
- grid_locations, grid_assitlocs = norm_grid_locations(grid_locations, grid_assitlocs)
- grid_list = norm_grid_list(grid_list)
- grid_values = norm_grid_values(grid_values)
+ else:
+ cr_name = ""
- if len(hsv_set) == 5:
- if "rule" in color:
- if color["rule"] in self._args.global_hm_rules:
- color_list.append((tuple(hsv_set), color["rule"], cr_name, cr_desc, cr_time, grid_locations, grid_assitlocs, grid_list, grid_values))
+ if "desc" in color:
+ cr_desc = str(color["desc"])
+ cr_desc = cr_desc.replace("$curr_path$", curr_path)
+ cr_desc = cr_desc.replace("$os_sep$", os.sep)
- else:
- finished_errs.append("[id {}] unknown rule: {}.".format(color_idx + 1, color["rule"]))
+ else:
+ cr_desc = ""
- else:
- finished_errs.append("[id {}] rule value is not found.".format(color_idx + 1))
+ if "time" in color:
+ cr_time = fmt_im_time(color["time"])
- else:
- finished_errs.append("[id {}] colors are not complete.".format(color_idx + 1))
+ else:
+ cr_time = (0, 0)
- except Exception as err:
- finished_errs.append("[id {}] {}".format(color_idx + 1, str(err)))
+ if "grid_locations" in color and "grid_assitlocs" in color:
+ grid_locations = color["grid_locations"]
+ grid_assitlocs = color["grid_assitlocs"]
- except Exception as err:
- self.warning(self._operation_errs[13] + "\n{}\n{}".format(self._operation_errs[17], err))
- return
+ else:
+ grid_locations = []
+ grid_assitlocs = []
+
+ if "grid_list" in color:
+ grid_list = color["grid_list"]
+
+ else:
+ grid_list = []
+
+ if "grid_values" in color:
+ grid_values = color["grid_values"]
+
+ else:
+ grid_values = {}
+
+ grid_locations, grid_assitlocs = norm_grid_locations(grid_locations, grid_assitlocs)
+ grid_list = norm_grid_list(grid_list)
+ grid_values = norm_grid_values(grid_values)
+
+ if len(hsv_set) == 5:
+ if "rule" in color and color["rule"] in self._args.global_hm_rules:
+ color_list.append((tuple(hsv_set), color["rule"], cr_name, cr_desc, cr_time, grid_locations, grid_assitlocs, grid_list, grid_values))
+
+ else:
+ broken_errs.append("[id {}] color rule is not found.".format(color_idx + 1))
+
+ else:
+ broken_errs.append("[id {}] colors are not complete.".format(color_idx + 1))
+
+ finished_errs += list(broken_errs)
if finished_errs:
self.warning(self._operation_errs[14] + "\n{}\n{}".format(self._operation_errs[17], "; ".join(finished_errs)))
@@ -360,10 +393,10 @@ def dp_save(self, depot_file, value):
# process start.
if depot_file.split(".")[-1].lower() in ("dpc", "json", "temp"):
- try:
- color_dict = {"version": self._args.info_version_en, "site": self._args.info_main_site, "type": "depot"}
- color_dict["palettes"] = export_list(color_list)
+ color_dict = {"version": self._args.info_version_en, "site": self._args.info_main_site, "type": "depot"}
+ color_dict["palettes"] = export_list(color_list)
+ try:
with open(depot_file, "w", encoding="utf-8") as f:
json.dump(color_dict, f, indent=4, ensure_ascii=False)
@@ -598,10 +631,12 @@ def dp_import(self, set_file, direct_dict=False, return_set=False):
for i in range(5):
if "color_{}".format(i) in color_dict:
+ curr_color = Color((0.0, 0.0, 1.0), tp="hsv")
+
if "hsv" in color_dict["color_{}".format(i)]:
try:
hsv = color_dict["color_{}".format(i)]["hsv"]
- color_set.append(Color(hsv, tp="hsv", overflow=self._args.sys_color_set.get_overflow()))
+ curr_color = Color(hsv, tp="hsv", overflow=self._args.sys_color_set.get_overflow())
except Exception as err:
self.warning(self._operation_errs[5] + "\n{}\n{}".format(self._operation_errs[17], err))
@@ -610,7 +645,7 @@ def dp_import(self, set_file, direct_dict=False, return_set=False):
elif "rgb" in color_dict["color_{}".format(i)]:
try:
hsv = color_dict["color_{}".format(i)]["rgb"]
- color_set.append(Color(hsv, tp="rgb", overflow=self._args.sys_color_set.get_overflow()))
+ curr_color = Color(hsv, tp="rgb", overflow=self._args.sys_color_set.get_overflow())
except Exception as err:
self.warning(self._operation_errs[5] + "\n{}\n{}".format(self._operation_errs[17], err))
@@ -619,7 +654,7 @@ def dp_import(self, set_file, direct_dict=False, return_set=False):
elif "hex_code" in color_dict["color_{}".format(i)]:
try:
hsv = color_dict["color_{}".format(i)]["hex_code"]
- color_set.append(Color(hsv, tp="hec", overflow=self._args.sys_color_set.get_overflow()))
+ curr_color = Color(hsv, tp="hec", overflow=self._args.sys_color_set.get_overflow())
except Exception as err:
self.warning(self._operation_errs[5] + "\n{}\n{}".format(self._operation_errs[17], err))
@@ -628,7 +663,7 @@ def dp_import(self, set_file, direct_dict=False, return_set=False):
elif "hex code" in color_dict["color_{}".format(i)]:
try:
hsv = color_dict["color_{}".format(i)]["hex code"]
- color_set.append(Color(hsv, tp="hec", overflow=self._args.sys_color_set.get_overflow()))
+ curr_color = Color(hsv, tp="hec", overflow=self._args.sys_color_set.get_overflow())
except Exception as err:
self.warning(self._operation_errs[5] + "\n{}\n{}".format(self._operation_errs[17], err))
@@ -638,6 +673,8 @@ def dp_import(self, set_file, direct_dict=False, return_set=False):
self.warning(self._operation_errs[6] + "\n{}\n{}".format(self._operation_errs[17], "hsv"))
return
+ color_set.append(curr_color)
+
else:
self.warning(self._operation_errs[7] + "\n{}\n{}".format(self._operation_errs[17], "color_{}".format(i)))
return
@@ -649,41 +686,33 @@ def dp_import(self, set_file, direct_dict=False, return_set=False):
grid_list = []
grid_values = {}
- try:
- if "grid_locations" in color_dict and "grid_assitlocs" in color_dict:
- grid_locations = color_dict["grid_locations"]
- grid_assitlocs = color_dict["grid_assitlocs"]
-
- if "grid_list" in color_dict:
- grid_list = color_dict["grid_list"]
+ if "grid_locations" in color_dict and "grid_assitlocs" in color_dict:
+ grid_locations = color_dict["grid_locations"]
+ grid_assitlocs = color_dict["grid_assitlocs"]
- if "grid_values" in color_dict:
- grid_values = color_dict["grid_values"]
+ if "grid_list" in color_dict:
+ grid_list = color_dict["grid_list"]
- grid_locations, grid_assitlocs = norm_grid_locations(grid_locations, grid_assitlocs)
- grid_list = norm_grid_list(grid_list)
- grid_values = norm_grid_values(grid_values)
+ if "grid_values" in color_dict:
+ grid_values = color_dict["grid_values"]
- except Exception as err:
- pass
+ grid_locations, grid_assitlocs = norm_grid_locations(grid_locations, grid_assitlocs)
+ grid_list = norm_grid_list(grid_list)
+ grid_values = norm_grid_values(grid_values)
if return_set:
set_name = ""
set_desc = ""
set_time = (0, 0)
- try:
- if "name" in color_dict:
- set_name = str(color_dict["name"])
-
- if "desc" in color_dict:
- set_desc = str(color_dict["desc"])
+ if "name" in color_dict:
+ set_name = str(color_dict["name"])
- if "time" in color_dict:
- set_time = norm_im_time(color_dict["time"])
+ if "desc" in color_dict:
+ set_desc = str(color_dict["desc"])
- except Exception as err:
- pass
+ if "time" in color_dict:
+ set_time = fmt_im_time(color_dict["time"])
return (color_set, color_dict["rule"], set_name, set_desc, set_time, grid_locations, grid_assitlocs, grid_list, grid_values)
@@ -763,10 +792,14 @@ def dp_export(self, set_file, value):
# process start.
if set_file.split(".")[-1].lower() in ("dps", "json", "temp"):
- try:
- color_dict = {"version": self._args.info_version_en, "site": self._args.info_main_site, "type": "set"}
- color_dict["palettes"] = export_list(color_list)
+ color_dict = {"version": self._args.info_version_en, "site": self._args.info_main_site, "type": "set"}
+ color_dict["palettes"] = export_list(color_list)
+
+ # delete the time of palette in color set temp file. for hash compare in main.py.
+ if set_file.split(".")[-1].lower() == "temp":
+ color_dict["palettes"][0]["time"] = [0, 0]
+ try:
with open(set_file, "w", encoding="utf-8") as f:
json.dump(color_dict, f, indent=4, ensure_ascii=False)
diff --git a/src/main/python/wgets/splash.py b/src/main/python/wgets/splash.py
index bfc513a..53fb438 100644
--- a/src/main/python/wgets/splash.py
+++ b/src/main/python/wgets/splash.py
@@ -38,11 +38,8 @@ def __init__(self, resources, sys_argv):
display_lang = "zh"
else:
- try:
- default_locale = str(locale.getdefaultlocale()[0])
-
- except Exception as err:
- default_locale = ""
+ default_locale = locale.getdefaultlocale()[0]
+ default_locale = str(default_locale).lower() if default_locale else ""
if len(default_locale) > 1 and default_locale[:2].lower() in ("zh", "ja", "ko"):
display_lang = "zh"
@@ -52,11 +49,11 @@ def __init__(self, resources, sys_argv):
with open(os.sep.join((resources, "settings.json")), "r", encoding="utf-8") as sf:
uss = json.load(sf)
- if isinstance(uss, dict) and "lang" in uss and str(uss["lang"])[:2].lower() in ("zh", "ja", "ko"):
- display_lang = "zh"
-
except Exception as err:
- pass
+ uss = None
+
+ if isinstance(uss, dict) and "lang" in uss and str(uss["lang"])[:2].lower() in ("zh", "ja", "ko"):
+ display_lang = "zh"
super().__init__()
diff --git a/src/main/python/wgets/wheel.py b/src/main/python/wgets/wheel.py
index 58a85f4..ea3f1b0 100644
--- a/src/main/python/wgets/wheel.py
+++ b/src/main/python/wgets/wheel.py
@@ -389,6 +389,7 @@ def mousePressEvent(self, event):
if already_accepted or (self._args.press_move and np.linalg.norm(point - self._center) < self._radius):
self._pressed_in_wheel = True
+ """
if self._args.sys_activated_assit_idx < 0:
color = Color(self._backup[self._args.sys_activated_idx], tp="color", overflow=self._backup[0].get_overflow())
color.s = np.linalg.norm(point - self._center) / self._radius
@@ -411,6 +412,7 @@ def mousePressEvent(self, event):
self._args.sys_grid_assitlocs[self._args.sys_activated_idx][self._args.sys_activated_assit_idx][3] = assit_s
self.ps_color_changed.emit(True)
+ """
event.accept()
# self.update() is completed by
@@ -421,6 +423,7 @@ def mousePressEvent(self, event):
if np.linalg.norm(point - self._cir_1_center) < self._v_tag_radius or self._args.press_move:
self._pressed_in_bar_1 = True
+ """
v = (point[1] - self._bar_1_box[1]) / self._bar_1_box[3]
if self._args.sys_activated_assit_idx < 0:
@@ -439,6 +442,7 @@ def mousePressEvent(self, event):
self._args.sys_grid_assitlocs[self._args.sys_activated_idx][self._args.sys_activated_assit_idx][4] = v
self.ps_color_changed.emit(True)
+ """
event.accept()
@@ -449,6 +453,7 @@ def mousePressEvent(self, event):
if np.linalg.norm(point - self._cir_2_center) < self._v_tag_radius or self._args.press_move:
self._pressed_in_bar_2 = True
+ """
v = (point[1] - self._bar_2_box[1]) / self._bar_2_box[3]
if self._args.sys_activated_assit_idx < 0:
@@ -467,6 +472,7 @@ def mousePressEvent(self, event):
self._args.sys_grid_assitlocs[self._args.sys_activated_idx][self._args.sys_activated_assit_idx][4] = v
self.ps_color_changed.emit(True)
+ """
event.accept()
diff --git a/src/main/resources/base/colors/README.md b/src/main/resources/base/colors/README.md
deleted file mode 100644
index aaa51f1..0000000
--- a/src/main/resources/base/colors/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-![Haworthia the Firework](../../../icons/full/icon_full_128.png)
-
-[中文](https://eigenmiao.com/yanhuo/) | [English](https://eigenmiao.com/rickrack/)
-
-This directory contains sample color sets for [Rickrack](https://github.com/eigenmiao/Rickrack).
-
-* [Chinese Traditional Colors](http://zhongguose.com/)
-* [Nippon Traditional Colors](https://nipponcolors.com/)
diff --git a/src/main/resources/base/colors/chinese_colors.json b/src/main/resources/base/colors/chinese_colors.json
deleted file mode 100644
index 0cedb39..0000000
--- a/src/main/resources/base/colors/chinese_colors.json
+++ /dev/null
@@ -1,1583 +0,0 @@
-{"comment": "This file contains Chinese Traditional Colors from website http://zhongguose.com/. Reference: '色谱, 中科院科技情报编委会名词室, 科学出版社, 1957.'. Copyright (c) 科学出版社.",
- "website": "http://zhongguose.com/", "publisher": "科学出版社", "reference": "色谱, 中科院科技情报编委会名词室, 科学出版社, 1957.", "names": [
- "暗玉紫",
- "牡丹粉红",
- "栗紫",
- "香叶红",
- "葡萄酱紫",
- "艳红",
- "玉红",
- "茶花红",
- "高粱红",
- "满江红",
- "鼠鼻红",
- "合欢红",
- "春梅红",
- "苋菜红",
- "烟红",
- "莓红",
- "鹅冠红",
- "枫叶红",
- "唐菖蒲红",
- "枣红",
- "猪肝紫",
- "葡萄紫",
- "暗紫苑红",
- "殷红",
- "草茉莉红",
- "酱紫",
- "山茶红",
- "锌灰",
- "海棠红",
- "蓟粉红",
- "石蕊红",
- "淡曙红",
- "李紫",
- "石竹红",
- "淡茜红",
- "金鱼紫",
- "山黎豆红",
- "鼠背灰",
- "淡蕊香红",
- "甘蔗紫",
- "月季红",
- "尖晶玉红",
- "水红",
- "姜红",
- "芦灰",
- "茄皮紫",
- "苍蝇灰",
- "锦葵红",
- "粉团花红",
- "石竹紫",
- "卵石紫",
- "晶红",
- "芝兰紫",
- "芍药耕红",
- "暮云灰",
- "豇豆红",
- "报春红",
- "淡绛红",
- "凤仙花红",
- "霞光红",
- "喜蛋红",
- "夹竹桃红",
- "松叶牡丹红",
- "莲瓣红",
- "白芨红",
- "隐红灰",
- "榲桲红",
- "酢酱草红",
- "火鹅紫",
- "鹞冠紫",
- "品红",
- "磨石紫",
- "墨紫",
- "檀紫",
- "初荷红",
- "菜头紫",
- "葡萄酒红",
- "淡青紫",
- "菠根红",
- "海象紫",
- "兔眼红",
- "嫩菱红",
- "洋葱紫",
- "吊钟花红",
- "绀紫",
- "紫荆红",
- "扁豆花红",
- "马鞭草紫",
- "藏花红",
- "斑鸠灰",
- "古铜紫",
- "丹紫红",
- "丁香淡紫",
- "玫瑰红",
- "古鼎灰",
- "菱锰红",
- "樱草紫",
- "龙须红",
- "电气石红",
- "玫瑰紫",
- "苋菜紫",
- "紫灰",
- "龙睛鱼紫",
- "青蛤壳紫",
- "萝兰紫",
- "荸荠紫",
- "豆蔻紫",
- "扁豆紫",
- "牵牛紫",
- "芓紫",
- "葛巾紫",
- "青莲",
- "芥花紫",
- "凤信紫",
- "深牵牛紫",
- "魏紫",
- "乌梅紫",
- "桔梗紫",
- "淡牵牛紫",
- "剑锋紫",
- "蕈紫",
- "槿紫",
- "芡食白",
- "龙葵紫",
- "藤萝紫",
- "沙鱼灰",
- "暗龙胆紫",
- "暗蓝紫",
- "野葡萄紫",
- "野菊紫",
- "水牛灰",
- "远山紫",
- "螺甸紫",
- "晶石紫",
- "满天星紫",
- "淡蓝紫",
- "山梗紫",
- "牛角灰",
- "鱼尾灰",
- "瓦罐灰",
- "钢蓝",
- "燕颔蓝",
- "鲸鱼灰",
- "青灰",
- "鸽蓝",
- "暗蓝",
- "钢青",
- "海涛蓝",
- "飞燕草蓝",
- "靛青",
- "安安蓝",
- "海军蓝",
- "景泰蓝",
- "品蓝",
- "尼罗蓝",
- "蝶翅蓝",
- "花青",
- "鷃蓝",
- "星蓝",
- "虹蓝",
- "柏林蓝",
- "群青",
- "云水蓝",
- "羽扇豆蓝",
- "战舰灰",
- "晴山蓝",
- "睛蓝",
- "搪磁蓝",
- "潮蓝",
- "天蓝",
- "大理石灰",
- "牵牛花蓝",
- "宝石蓝",
- "淡蓝灰",
- "嫩灰",
- "银鱼白",
- "釉蓝",
- "涧石蓝",
- "远天蓝",
- "云山蓝",
- "秋波蓝",
- "井天蓝",
- "鸢尾蓝",
- "云峰白",
- "星灰",
- "钴蓝",
- "碧青",
- "苍蓝",
- "深灰蓝",
- "灰蓝",
- "湖水蓝",
- "海青",
- "黄昏灰",
- "霁青",
- "玉鈫蓝",
- "胆矾蓝",
- "樫鸟蓝",
- "鸥蓝",
- "翠蓝",
- "蜻蜓蓝",
- "孔雀蓝",
- "蔚蓝",
- "瀑布蓝",
- "闪蓝",
- "甸子蓝",
- "晚波蓝",
- "清水蓝",
- "夏云灰",
- "海天蓝",
- "虾壳青",
- "石绿",
- "穹灰",
- "美蝶绿",
- "垩灰",
- "蓝绿",
- "竹绿",
- "亚丁绿",
- "月影白",
- "海王绿",
- "深海绿",
- "绿灰",
- "青矾绿",
- "苍绿",
- "飞泉绿",
- "莽丛绿",
- "梧枝绿",
- "铜绿",
- "草原远绿",
- "蛙绿",
- "浪花绿",
- "苷蓝绿",
- "粉绿",
- "淡绿灰",
- "麦苗绿",
- "翠绿",
- "葱绿",
- "荷叶绿",
- "淡绿",
- "田园绿",
- "玉簪绿",
- "蟾绿",
- "蔻梢绿",
- "薄荷绿",
- "月白",
- "蛋白石绿",
- "竹篁绿",
- "孔雀绿",
- "宫殿绿",
- "云杉绿",
- "毛绿",
- "冰山蓝",
- "明灰",
- "明绿",
- "松霜绿",
- "白屈菜绿",
- "狼烟灰",
- "瓦松绿",
- "槲寄生绿",
- "淡翠绿",
- "玉髓绿",
- "鲜绿",
- "油绿",
- "宝石绿",
- "嘉陵水绿",
- "田螺绿",
- "水绿",
- "鹦鹉绿",
- "艾背绿",
- "艾绿",
- "镍灰",
- "橄榄石绿",
- "芽绿",
- "嫩菊绿",
- "芦苇绿",
- "姚黄",
- "蒽油绿",
- "苹果绿",
- "海沬绿",
- "橄榄黄绿",
- "槐花黄绿",
- "蝶黄",
- "象牙白",
- "橄榄绿",
- "雪白",
- "淡灰绿",
- "佛手黄",
- "乳白",
- "香蕉黄",
- "新禾绿",
- "油菜花黄",
- "秋葵黄",
- "柚黄",
- "草黄",
- "硫华黄",
- "姜黄",
- "潭水绿",
- "金瓜黄",
- "麦秆黄",
- "蒿黄",
- "茉莉黄",
- "藤黄",
- "芒果黄",
- "海参灰",
- "碧螺春绿",
- "苔绿",
- "柠檬黄",
- "草灰绿",
- "向日葵黄",
- "素馨黄",
- "乳鸭黄",
- "月灰",
- "葵扇黄",
- "大豆黄",
- "金盏黄",
- "菊蕾白",
- "黄连黄",
- "杏仁黄",
- "谷黄",
- "木瓜黄",
- "淡茧黄",
- "雅梨黄",
- "银白",
- "棕榈绿",
- "鹦鹉冠黄",
- "枯绿",
- "浅烙黄",
- "淡密黄",
- "芥黄",
- "栀子黄",
- "暗海水绿",
- "篾黄",
- "蚌肉白",
- "炒米黄",
- "琥珀黄",
- "灰绿",
- "粽叶绿",
- "尘灰",
- "鼬黄",
- "象牙黄",
- "鲛青",
- "豆汁黄",
- "土黄",
- "香水玫瑰黄",
- "虎皮黄",
- "鸡蛋黄",
- "银鼠灰",
- "鱼肚白",
- "初熟杏黄",
- "山鸡黄",
- "莲子白",
- "蟹壳灰",
- "沙石黄",
- "甘草黄",
- "燕羽灰",
- "鹅掌黄",
- "麦芽糖黄",
- "浅驼色",
- "百灵鸟灰",
- "酪黄",
- "荔肉白",
- "淡肉色",
- "河豚灰",
- "蜴蜊绿",
- "汉白玉",
- "橙皮黄",
- "莱阳梨黄",
- "枇杷黄",
- "金叶黄",
- "苍黄",
- "粉白",
- "淡橘橙",
- "珍珠灰",
- "龟背黄",
- "浅灰",
- "铅灰",
- "中灰",
- "雄黄",
- "蜜黄",
- "风帆黄",
- "桂皮淡棕",
- "金莺黄",
- "肉色",
- "凋叶棕",
- "古铜绿",
- "落英淡粉",
- "软木黄",
- "瓜瓤粉",
- "榴萼黄",
- "玳瑁黄",
- "焦茶绿",
- "蟹壳绿",
- "山鸡褐",
- "猴毛灰",
- "鹿角棕",
- "淡松烟",
- "万寿菊黄",
- "蛋壳黄",
- "杏黄",
- "橄榄灰",
- "鹤灰",
- "玛瑙灰",
- "淡银灰",
- "瓦灰",
- "夜灰",
- "北瓜黄",
- "荷花白",
- "松鼠灰",
- "淡米粉",
- "深灰",
- "海鸥灰",
- "茶褐",
- "驼色",
- "银灰",
- "鹿皮褐",
- "槟榔综",
- "晓灰",
- "淡赭",
- "古铜褐",
- "麂棕",
- "醉瓜肉",
- "雁灰",
- "鲑鱼红",
- "橘橙",
- "金黄",
- "玫瑰粉",
- "美人焦橙",
- "米色",
- "蛛网灰",
- "淡咖啡",
- "海螺橙",
- "岩石棕",
- "芒果棕",
- "陶瓷红",
- "菠萝红",
- "余烬红",
- "金莲花橙",
- "火砖红",
- "初桃粉红",
- "铁棕",
- "介壳淡粉红",
- "蟹壳红",
- "金驼",
- "燕颔红",
- "淡可可棕",
- "晨曦红",
- "玉粉红",
- "野蔷薇红",
- "藕荷",
- "长石灰",
- "中红灰",
- "火泥棕",
- "绀红",
- "莓酱红",
- "丁香棕",
- "淡玫瑰灰",
- "瓜瓤红",
- "淡藏花红",
- "筍皮棕",
- "润红",
- "龙睛鱼红",
- "淡土黄",
- "珠母灰",
- "芙蓉红",
- "落霞红",
- "法螺红",
- "草珠红",
- "咖啡",
- "中灰驼",
- "椰壳棕",
- "蟹蝥红",
- "淡豆沙",
- "淡桃红",
- "淡铁灰",
- "石板灰",
- "淡栗棕",
- "银朱",
- "草莓红",
- "洋水仙红",
- "朱红",
- "榴花红",
- "柿红",
- "可可棕",
- "淡罂粟红",
- "大红",
- "柞叶棕",
- "蜻蜓红",
- "橡树棕",
- "颊红",
- "桃红",
- "火岩棕",
- "淡藤萝紫",
- "赭石",
- "铁水红",
- "胭脂红",
- "极光红",
- "红汞红",
- "萝卜红",
- "曲红",
- "谷鞘红",
- "苹果红",
- "桂红",
- "粉红",
- "暗驼棕",
- "夕阳红",
- "樱桃红",
- "珊瑚红",
- "火山棕",
- "栗棕",
- "鹤顶红",
- "舌红",
- "鹅血石红",
- "酱棕",
- "鱼鳃红",
- "芦穗灰",
- "丽春红",
- "覆盆子红",
- "海报灰",
- "豆沙",
- "榴子红",
- "秋海棠红",
- "无花果红",
- "淡绯",
- "玫瑰灰",
- "淡菽红",
- "枸枢红",
- "貂紫"
-], "pronunciations": [
- "anyuzi",
- "mudanfenhong",
- "lizi",
- "xiangyehong",
- "putaojiangzi",
- "yanhong",
- "yuhong",
- "chahuahong",
- "gaolianghong",
- "manjianghong",
- "shubihong",
- "hehuanhong",
- "chunmeihong",
- "xiancaihong",
- "yanhong",
- "meihong",
- "eguanhong",
- "fengyehong",
- "tangchangpuhong",
- "zaohong",
- "zhuganzi",
- "putaozi",
- "anziyuanhong",
- "yanhong",
- "caomolihong",
- "jiangzi",
- "shanchahong",
- "xinhui",
- "haitanghong",
- "jifenhong",
- "shiruihong",
- "danshuhong",
- "lizi",
- "shizhuhong",
- "danqianhong",
- "jinyuzi",
- "shanlidouhong",
- "shubeihui",
- "danruixianghong",
- "ganzhezi",
- "yuejihong",
- "jianjingyuhong",
- "shuihong",
- "jianghong",
- "luhui",
- "qiepizi",
- "cangyinghui",
- "jinkuihong",
- "fentuanhuahong",
- "shizhuzi",
- "luanshizi",
- "jinghong",
- "zhilanzi",
- "shaoyaogenghong",
- "muyunhui",
- "jiangdouhong",
- "baochunhong",
- "danjianghong",
- "fengxianhuahong",
- "xiaguanghong",
- "xidanhong",
- "jiazhutaohong",
- "songyemudanhong",
- "lianbanhong",
- "baijihong",
- "yinhonghui",
- "wenpohong",
- "cujiangcaohong",
- "huoezi",
- "yaoguanzi",
- "pinhong",
- "moshizi",
- "mozi",
- "tanzi",
- "chuhehong",
- "caitouzi",
- "putaojiuhong",
- "danqingzi",
- "bogenhong",
- "haixiangzi",
- "tuyanhong",
- "nenlinghong",
- "yangcongzi",
- "diaozhonghuahong",
- "ganzi",
- "zijinghong",
- "biandouhuahong",
- "mabiancaozi",
- "canghuahong",
- "banjiuhui",
- "gutongzi",
- "danzihong",
- "dingxiangdanzi",
- "meiguihong",
- "gudinghui",
- "lingmenghong",
- "yingcaozi",
- "longxuhong",
- "dianqishihong",
- "meiguizi",
- "xiancaizi",
- "zihui",
- "longjingyuzi",
- "qinghakezi",
- "luolanzi",
- "biqizi",
- "doukouzi",
- "biandouzi",
- "qianniuzi",
- "zizi",
- "gejinzi",
- "qinglian",
- "jiehuazi",
- "fengxinzi",
- "shenqianniuzi",
- "weizi",
- "wumeizi",
- "jiegengzi",
- "danqianniuzi",
- "jianfengzi",
- "xunzi",
- "jinzi",
- "qianshibai",
- "longkuizi",
- "tengluozi",
- "shayuhui",
- "anlongdanzi",
- "anlanzi",
- "yeputaozi",
- "yejuzi",
- "shuiniuhui",
- "yuanshanzi",
- "luodianzi",
- "jingshizi",
- "mantianxingzi",
- "danlanzi",
- "shangengzi",
- "niujiaohui",
- "yuweihui",
- "waguanhui",
- "ganglan",
- "yanhanlan",
- "jingyuhui",
- "qinghui",
- "gelan",
- "anlan",
- "gangqing",
- "haitaolan",
- "feiyancaolan",
- "dianqing",
- "ananlan",
- "haijunlan",
- "jingtailan",
- "pinlan",
- "niluolan",
- "diechilan",
- "huaqing",
- "yanlan",
- "xinglan",
- "honglan",
- "bolinlan",
- "qunqing",
- "yunshuilan",
- "yushandoulan",
- "zhanjianhui",
- "qingshanlan",
- "jinglan",
- "tangcilan",
- "chaolan",
- "tianlan",
- "dalishihui",
- "qianniuhualan",
- "baoshilan",
- "danlanhui",
- "nenhui",
- "yinyubai",
- "youlan",
- "jianshilan",
- "yuantianlan",
- "yunshanlan",
- "qiubolan",
- "jingtianlan",
- "yuanweilan",
- "yunfengbai",
- "xinghui",
- "gulan",
- "biqing",
- "canglan",
- "shenhuilan",
- "huilan",
- "hushuilan",
- "haiqing",
- "huanghunhui",
- "jiqing",
- "yuqinlan",
- "danfanlan",
- "jianniaolan",
- "oulan",
- "cuilan",
- "qingtinglan",
- "kongquelan",
- "weilan",
- "pubulan",
- "shanlan",
- "dianzilan",
- "wanbolan",
- "qingshuilan",
- "xiayunhui",
- "haitianlan",
- "xiakeqing",
- "shilv",
- "qionghui",
- "meidielv",
- "ehui",
- "lanlv",
- "zhulv",
- "yadinglv",
- "yueyingbai",
- "haiwanglv",
- "shenhailv",
- "lvhui",
- "qingfanlv",
- "canglv",
- "feiquanlv",
- "mangconglv",
- "wuzhilv",
- "tonglv",
- "caoyuanyuanlv",
- "walv",
- "langhualv",
- "ganlanlv",
- "fenlv",
- "danlvhui",
- "maimiaolv",
- "cuilv",
- "conglv",
- "heyelv",
- "danlv",
- "tianyuanlv",
- "yuzanlv",
- "chanlv",
- "koushaolv",
- "bohelv",
- "yuebai",
- "danbaishilv",
- "zhuhuanglv",
- "kongquelv",
- "gongdianlv",
- "yunshanlv",
- "maolv",
- "bingshanlan",
- "minghui",
- "minglv",
- "songshuanglv",
- "baiqucailv",
- "langyanhui",
- "wasonglv",
- "hujishenglv",
- "dancuilv",
- "yusuilv",
- "xianlv",
- "youlv",
- "baoshilv",
- "jialingshuilv",
- "tianluolv",
- "shuilv",
- "yingwulv",
- "aibeilv",
- "ailv",
- "niehui",
- "ganlanshilv",
- "yalv",
- "nenjulv",
- "luweilv",
- "yaohuang",
- "enyoulv",
- "pingguolv",
- "haimeilv",
- "ganlanhuanglv",
- "huaihuahuanglv",
- "diehuang",
- "xiangyabai",
- "ganlanlv",
- "xuebai",
- "danhuilv",
- "foshouhuang",
- "rubai",
- "xiangjiaohuang",
- "xinhelv",
- "youcaihuahuang",
- "qiukuihuang",
- "youhuang",
- "caohuang",
- "liuhuahuang",
- "jianghuang",
- "tanshuilv",
- "jinguahuang",
- "maiganhuang",
- "haohuang",
- "molihuang",
- "tenghuang",
- "mangguohuang",
- "haishenhui",
- "biluochunlv",
- "tailv",
- "ningmenghuang",
- "caohuilv",
- "xiangrikuihuang",
- "suxinhuang",
- "ruyahuang",
- "yuehui",
- "kuishanhuang",
- "dadouhuang",
- "jinzhanhuang",
- "juleibai",
- "huanglianhuang",
- "xingrenhuang",
- "guhuang",
- "muguahuang",
- "danjianhuang",
- "yalihuang",
- "yinbai",
- "zonglvlv",
- "yingwuguanhuang",
- "kulv",
- "qianlaohuang",
- "danmihuang",
- "jiehuang",
- "zhizihuang",
- "anhaishuilv",
- "miehuang",
- "bangroubai",
- "chaomihuang",
- "hupohuang",
- "huilv",
- "zongyelv",
- "chenhui",
- "youhuang",
- "xiangyahuang",
- "jiaoqing",
- "douzhihuang",
- "tuhuang",
- "xiangshuimeiguihuang",
- "hupihuang",
- "jidanhuang",
- "yinshuhui",
- "yudubai",
- "chushuxinghuang",
- "shanjihuang",
- "lianzibai",
- "xiekehui",
- "shashihuang",
- "gancaohuang",
- "yanyuhui",
- "ezhanghuang",
- "maiyatanghuang",
- "qiantuose",
- "bailingniaohui",
- "laohuang",
- "liroubai",
- "danrouse",
- "hetunhui",
- "yililv",
- "hanbaiyu",
- "chengpihuang",
- "laiyanglihuang",
- "pipahuang",
- "jinyehuang",
- "canghuang",
- "fenbai",
- "danjucheng",
- "zhenzhuhui",
- "guibeihuang",
- "qianhui",
- "qianhui",
- "zhonghui",
- "xionghuang",
- "mihuang",
- "fengfanhuang",
- "guipidanzong",
- "jinyinghuang",
- "rouse",
- "diaoyezong",
- "gutonglv",
- "luoyingdanfen",
- "ruanmuhuang",
- "guarangfen",
- "liuehuang",
- "daimaohuang",
- "jiaochalv",
- "xiekelv",
- "shanjihe",
- "houmaohui",
- "lujiaozong",
- "dansongyan",
- "wanshoujuhuang",
- "dankehuang",
- "xinghuang",
- "ganlanhui",
- "hehui",
- "manaohui",
- "danyinhui",
- "wahui",
- "yehui",
- "beiguahuang",
- "hehuabai",
- "songshuhui",
- "danmifen",
- "shenhui",
- "haiouhui",
- "chahe",
- "tuose",
- "yinhui",
- "lupihe",
- "binglangzong",
- "xiaohui",
- "danzhe",
- "gutonghe",
- "jizong",
- "zuiguarou",
- "yanhui",
- "guiyuhong",
- "jucheng",
- "jinhuang",
- "meiguifen",
- "meirenjiaocheng",
- "mise",
- "zhuwanghui",
- "dankafei",
- "hailuocheng",
- "yanshizong",
- "mangguozong",
- "taocihong",
- "boluohong",
- "yujinhong",
- "jinlianhuacheng",
- "huozhuanhong",
- "chutaofenhong",
- "tiezong",
- "jieqiaodanfenhong",
- "xiekehong",
- "jintuo",
- "yanhanhong",
- "dankekezong",
- "chenxihong",
- "yufenhong",
- "yeqiangweihong",
- "ouhe",
- "changshihui",
- "zhonghonghui",
- "huonizong",
- "ganhong",
- "meijianghong",
- "dingxiangzong",
- "danmeiguihui",
- "guaranghong",
- "dancanghuahong",
- "sunpizong",
- "runhong",
- "longjingyuhong",
- "dantuhuang",
- "zhumuhui",
- "furonghong",
- "luoxiahong",
- "faluohong",
- "caozhuhong",
- "kafei",
- "zhonghuituo",
- "yekezong",
- "xiemaohong",
- "dandousha",
- "dantaohong",
- "dantiehui",
- "shibanhui",
- "danlizong",
- "yinzhu",
- "caomeihong",
- "yangshuixianhong",
- "zhuhong",
- "liuhuahong",
- "shihong",
- "kekezong",
- "danyingsuhong",
- "dahong",
- "zhayezong",
- "qingtinghong",
- "xiangshuzong",
- "jiahong",
- "taohong",
- "huoyanzong",
- "dantengluozi",
- "zheshi",
- "tieshuihong",
- "yanzhihong",
- "jiguanghong",
- "honggonghong",
- "luobohong",
- "quhong",
- "guqiaohong",
- "pingguohong",
- "guihong",
- "fenhong",
- "antuozong",
- "xiyanghong",
- "yingtaohong",
- "shanhuhong",
- "huoshanzong",
- "lizong",
- "hedinghong",
- "shehong",
- "exueshihong",
- "jiangzong",
- "yusaihong",
- "lusuihui",
- "lichunhong",
- "fupenzihong",
- "haibaohui",
- "dousha",
- "liuzihong",
- "qiuhaitanghong",
- "wuhuaguohong",
- "danfei",
- "meiguihui",
- "danshuhong",
- "goushuhong",
- "diaozi"
-], "colors": [
- "5c2223",
- "eea2a4",
- "5a191b",
- "f07c82",
- "5a1216",
- "ed5a65",
- "c04851",
- "ee3f4d",
- "c02c38",
- "a7535a",
- "e3b4b8",
- "f0a1a8",
- "f1939c",
- "a61b29",
- "894e54",
- "c45a65",
- "d11a2d",
- "c21f30",
- "de1c31",
- "7c1823",
- "541e24",
- "4c1f24",
- "82202b",
- "82111f",
- "ef475d",
- "4d1018",
- "ed556a",
- "7a7374",
- "f03752",
- "e6d2d5",
- "f0c9cf",
- "ee2746",
- "2b1216",
- "ee4863",
- "e77c8e",
- "500a16",
- "c27c88",
- "73575c",
- "ee4866",
- "621624",
- "ce5777",
- "cc163a",
- "f1c4cd",
- "eeb8c3",
- "856d72",
- "2d0c13",
- "36282b",
- "bf3553",
- "ec9bad",
- "63071c",
- "30161c",
- "eea6b7",
- "e9ccd3",
- "eba0b3",
- "4f383e",
- "ed9db2",
- "ec8aa4",
- "ec7696",
- "ea7293",
- "ef82a0",
- "ec2c64",
- "eb507e",
- "eb3c70",
- "ea517f",
- "de7897",
- "b598a1",
- "ed2f6a",
- "c5708b",
- "33141e",
- "621d34",
- "ef3473",
- "382129",
- "310f1b",
- "381924",
- "e16c96",
- "951c48",
- "62102e",
- "e0c8d1",
- "d13c74",
- "4b1e2f",
- "ec4e8a",
- "de3f7c",
- "a8456b",
- "ce5e8a",
- "461629",
- "ee2c79",
- "ef498b",
- "ede3e7",
- "ec2d7a",
- "482936",
- "440e25",
- "d2568c",
- "e9d7df",
- "d2357d",
- "36292f",
- "d276a3",
- "c06f98",
- "cc5595",
- "c35691",
- "ba2f7b",
- "9b1e64",
- "5d3f51",
- "4e2a40",
- "bc84a8",
- "c08eaf",
- "411c35",
- "ad6598",
- "a35c8f",
- "681752",
- "894276",
- "7e2065",
- "8b2671",
- "983680",
- "c8adc4",
- "1c0d1a",
- "7e1671",
- "1e131d",
- "813c85",
- "d1c2d3",
- "3e3841",
- "815c94",
- "806d9e",
- "e2e1e4",
- "322f3b",
- "8076a3",
- "35333c",
- "22202e",
- "131124",
- "302f4b",
- "525288",
- "2f2f35",
- "ccccd6",
- "74759b",
- "1f2040",
- "2e317c",
- "a7a8bd",
- "61649f",
- "2d2e36",
- "5e616d",
- "47484c",
- "0f1423",
- "131824",
- "475164",
- "2b333e",
- "1c2938",
- "101f30",
- "142334",
- "15559a",
- "0f59a4",
- "1661ab",
- "3170a7",
- "346c9c",
- "2775b6",
- "2b73af",
- "2474b5",
- "4e7ca1",
- "2376b7",
- "144a74",
- "93b5cf",
- "2177b8",
- "126bae",
- "1772b4",
- "baccd9",
- "619ac3",
- "495c69",
- "8fb2c9",
- "5698c3",
- "11659a",
- "2983bb",
- "1677b3",
- "c4cbcf",
- "1177b0",
- "2486b9",
- "5e7987",
- "74787a",
- "cdd1d3",
- "1781b5",
- "66a9c9",
- "d0dfe6",
- "2f90b9",
- "8abcd1",
- "c3d7df",
- "158bb8",
- "d8e3e7",
- "b2bbbe",
- "1a94bc",
- "5cb3cc",
- "134857",
- "132c33",
- "21373d",
- "b0d5df",
- "22a2c3",
- "474b4c",
- "63bbd0",
- "126e82",
- "0f95b0",
- "1491a8",
- "c7d2d4",
- "1e9eb3",
- "3b818c",
- "0eb0c9",
- "29b7cb",
- "51c4d3",
- "7cabb1",
- "10aec2",
- "648e93",
- "93d5dc",
- "617172",
- "c6e6e8",
- "869d9d",
- "57c3c2",
- "c4d7d6",
- "12aa9c",
- "737c7b",
- "12a182",
- "1ba784",
- "428675",
- "c0c4c3",
- "248067",
- "1a3b32",
- "314a43",
- "2c9678",
- "223e36",
- "497568",
- "141e1b",
- "69a794",
- "2bae85",
- "9abeaf",
- "45b787",
- "92b3a5",
- "1f2623",
- "83cbac",
- "70887d",
- "55bb8a",
- "20a162",
- "40a070",
- "1a6840",
- "61ac85",
- "68b88e",
- "a4cab6",
- "3c9566",
- "5dbe8a",
- "207f4c",
- "eef7f2",
- "579572",
- "b9dec9",
- "229453",
- "20894d",
- "15231b",
- "66c18c",
- "a4aca7",
- "8a988e",
- "9eccab",
- "83a78d",
- "485b4d",
- "5d655f",
- "6e8b74",
- "2b312c",
- "c6dfc8",
- "41b349",
- "43b244",
- "253d24",
- "41ae3c",
- "add5a2",
- "5e665b",
- "8cc269",
- "5bae23",
- "dfecd5",
- "cad3c3",
- "9fa39a",
- "b2cf87",
- "96c24e",
- "f0f5e5",
- "b7d07a",
- "d0deaa",
- "373834",
- "bacf65",
- "e2e7bf",
- "bec936",
- "d2d97a",
- "e2d849",
- "fffef8",
- "5e5314",
- "fffef9",
- "ad9e5f",
- "fed71a",
- "f9f4dc",
- "e4bf11",
- "d2b116",
- "fbda41",
- "eed045",
- "f1ca17",
- "d2b42c",
- "f2ce2b",
- "e2c027",
- "645822",
- "fcd217",
- "f8df70",
- "dfc243",
- "f8df72",
- "ffd111",
- "ddc871",
- "fffefa",
- "867018",
- "887322",
- "fcd337",
- "8e804b",
- "fecc11",
- "fccb16",
- "ffc90c",
- "b7ae8f",
- "f8d86a",
- "fbcd31",
- "fcc307",
- "e9ddb6",
- "fcc515",
- "f7e8aa",
- "e8b004",
- "f9c116",
- "f9d770",
- "fbc82f",
- "f1f0ed",
- "5b4913",
- "f6c430",
- "b78d12",
- "f9bd10",
- "f9d367",
- "d9a40e",
- "ebb10d",
- "584717",
- "f7de98",
- "f9f1db",
- "f4ce69",
- "feba07",
- "8a6913",
- "876818",
- "b6a476",
- "fcb70a",
- "f0d695",
- "87723e",
- "f8e8c1",
- "d6a01d",
- "f7da94",
- "eaad1a",
- "fbb612",
- "b5aa90",
- "f7f4ed",
- "f8bc31",
- "b78b26",
- "e5d3aa",
- "695e45",
- "e5b751",
- "f3bf4c",
- "685e48",
- "fbb929",
- "f9d27d",
- "e2c17c",
- "b4a992",
- "f6dead",
- "f2e6ce",
- "f8e0b0",
- "393733",
- "835e1d",
- "f8f4ed",
- "fca104",
- "815f25",
- "fca106",
- "ffa60f",
- "806332",
- "fbf2e3",
- "fba414",
- "e4dfd7",
- "826b48",
- "dad4cb",
- "bbb5ac",
- "bbb5ac",
- "ff9900",
- "fbb957",
- "dc9123",
- "c09351",
- "f4a83a",
- "f7c173",
- "e7a23f",
- "533c1b",
- "f9e8d0",
- "de9e44",
- "f9cb8b",
- "f9a633",
- "daa45a",
- "553b18",
- "513c20",
- "986524",
- "97846c",
- "e3bd8d",
- "4d4030",
- "fb8b05",
- "f8c387",
- "f28e16",
- "503e2a",
- "4a4035",
- "cfccc9",
- "c1b2a3",
- "867e76",
- "847c74",
- "fc8c23",
- "fbecde",
- "4f4032",
- "fbeee2",
- "81776e",
- "9a8878",
- "5d3d21",
- "66462a",
- "918072",
- "d99156",
- "c1651a",
- "d4c4b7",
- "be7e4a",
- "5c3719",
- "de7622",
- "db8540",
- "80766e",
- "f09c5a",
- "f97d1c",
- "f26b1f",
- "f8b37f",
- "fa7e23",
- "f9e9cd",
- "b7a091",
- "945833",
- "f0945d",
- "964d22",
- "954416",
- "e16723",
- "fc7930",
- "cf7543",
- "f86b1d",
- "cd6227",
- "f6dcce",
- "d85916",
- "f7cfba",
- "f27635",
- "e46828",
- "fc6315",
- "b7511d",
- "ea8958",
- "e8b49a",
- "fb9968",
- "edc3ae",
- "363433",
- "8b614d",
- "aa6a4c",
- "a6522c",
- "fa5d19",
- "71361d",
- "b89485",
- "f68c60",
- "f6ad8f",
- "732e12",
- "f7cdbc",
- "ef632b",
- "8c4b31",
- "64483d",
- "f9723d",
- "cf4813",
- "ee8055",
- "f8ebe6",
- "753117",
- "603d30",
- "883a1e",
- "b14b28",
- "873d24",
- "f6cec1",
- "5b423a",
- "624941",
- "673424",
- "f43e06",
- "ef6f48",
- "f4c7ba",
- "ed5126",
- "f34718",
- "f2481b",
- "652b1c",
- "eea08c",
- "f04b22",
- "692a1b",
- "f1441d",
- "773d31",
- "eeaa9c",
- "f0ada0",
- "863020",
- "f2e7e5",
- "862617",
- "f5391c",
- "f03f24",
- "f33b1f",
- "f23e23",
- "f13c22",
- "f05a46",
- "f17666",
- "f15642",
- "f25a47",
- "f2b9b2",
- "592620",
- "de2a18",
- "ed3321",
- "f04a3a",
- "482522",
- "5c1e19",
- "d42517",
- "f19790",
- "ab372f",
- "5a1f1b",
- "ed3b2f",
- "bdaead",
- "eb261a",
- "ac1f18",
- "483332",
- "481e1c",
- "f1908c",
- "ec2b24",
- "efafad",
- "f2cac9",
- "4b2e2b",
- "ed4845",
- "ed3333",
- "5d3131"
-]}
diff --git a/src/main/resources/base/colors/nippon_colors.json b/src/main/resources/base/colors/nippon_colors.json
deleted file mode 100644
index ee2a154..0000000
--- a/src/main/resources/base/colors/nippon_colors.json
+++ /dev/null
@@ -1,755 +0,0 @@
-{"comment": "This file contains Nippon Traditional Colors from website https://nipponcolors.com/. Reference: '日本の伝統色 The Traditional Colors of Japan, PIE BOOKS, 2007.'. Copyright (c) PIE BOOKS.",
- "website": "https://nipponcolors.com/", "publisher": "PIE BOOKS", "reference": "日本の伝統色 The Traditional Colors of Japan, PIE BOOKS, 2007.", "names": [
- "撫子",
- "紅梅",
- "蘇芳",
- "退紅",
- "一斥染",
- "桑染",
- "桃",
- "苺",
- "薄紅",
- "今様",
- "中紅",
- "桜",
- "梅鼠",
- "韓紅花",
- "燕脂",
- "紅",
- "鴇",
- "長春",
- "深緋",
- "桜鼠",
- "甚三紅",
- "小豆",
- "蘇芳香",
- "赤紅",
- "真朱",
- "灰桜",
- "栗梅",
- "海老茶",
- "銀朱",
- "黒鳶",
- "紅鳶",
- "曙",
- "紅樺",
- "水がき",
- "珊瑚朱",
- "紅檜皮",
- "猩猩緋",
- "鉛丹",
- "芝翫茶",
- "檜皮",
- "柿渋",
- "緋",
- "鳶",
- "紅緋",
- "栗皮茶",
- "弁柄",
- "照柿",
- "江戸茶",
- "洗朱",
- "百塩茶",
- "唐茶",
- "ときがら茶",
- "黄丹",
- "纁",
- "遠州茶",
- "樺茶",
- "焦茶",
- "赤香",
- "雀茶",
- "宍",
- "宗伝唐茶",
- "樺",
- "深支子",
- "胡桃",
- "代赭",
- "洗柿",
- "黄櫨染",
- "赤朽葉",
- "礪茶",
- "赤白橡",
- "煎茶",
- "萱草",
- "洒落柿",
- "紅鬱金",
- "梅染",
- "枇杷茶",
- "丁子茶",
- "憲法染",
- "琥珀",
- "薄柿",
- "伽羅",
- "丁子染",
- "柴染",
- "朽葉",
- "金茶",
- "狐",
- "煤竹",
- "薄香",
- "砥粉",
- "銀煤竹",
- "黄土",
- "白茶",
- "媚茶",
- "黄唐茶",
- "山吹",
- "山吹茶",
- "櫨染",
- "桑茶",
- "玉子",
- "白橡",
- "黄橡",
- "玉蜀黍",
- "花葉",
- "生壁",
- "鳥の子",
- "浅黄",
- "黄朽葉",
- "梔子",
- "籐黄",
- "鬱金",
- "芥子",
- "肥後煤竹",
- "利休白茶",
- "灰汁",
- "利休茶",
- "路考茶",
- "菜種油",
- "鶯茶",
- "黄海松茶",
- "海松茶",
- "刈安",
- "菜の花",
- "黄蘗",
- "蒸栗",
- "青朽葉",
- "女郎花",
- "鶸茶",
- "鶸",
- "鶯",
- "柳茶",
- "苔",
- "麹塵",
- "璃寛茶",
- "藍媚茶",
- "海松",
- "千歳茶",
- "梅幸茶",
- "鶸萌黄",
- "柳染",
- "裏柳",
- "岩井茶",
- "萌黄",
- "苗",
- "柳煤竹",
- "松葉",
- "青丹",
- "薄青",
- "柳鼠",
- "常磐",
- "若竹",
- "千歳緑",
- "緑",
- "白緑",
- "老竹",
- "木賊",
- "御納戸茶",
- "緑青",
- "錆青磁",
- "青竹",
- "ビロード",
- "虫襖",
- "藍海松茶",
- "沈香茶",
- "青緑",
- "青磁",
- "鉄",
- "水浅葱",
- "青碧",
- "錆鉄御納戸",
- "高麗納戸",
- "白群",
- "御召茶",
- "瓶覗",
- "深川鼠",
- "錆浅葱",
- "水",
- "浅葱",
- "御納戸",
- "藍",
- "新橋",
- "錆御納戸",
- "鉄御納戸",
- "花浅葱",
- "藍鼠",
- "舛花",
- "空",
- "熨斗目花",
- "千草",
- "御召御納戸",
- "縹",
- "勿忘草",
- "群青",
- "露草",
- "黒橡",
- "紺",
- "褐",
- "瑠璃",
- "瑠璃紺",
- "紅碧",
- "藤鼠",
- "鉄紺",
- "紺青",
- "紅掛花",
- "紺桔梗",
- "藤",
- "二藍",
- "楝",
- "藤紫",
- "桔梗",
- "紫苑",
- "滅紫",
- "薄",
- "半",
- "江戸紫",
- "紫紺",
- "深紫",
- "菫",
- "紫",
- "菖蒲",
- "藤煤竹",
- "紅藤",
- "黒紅",
- "茄子紺",
- "葡萄鼠",
- "鳩羽鼠",
- "杜若",
- "蒲葡",
- "牡丹",
- "梅紫",
- "似紫",
- "躑躅",
- "紫鳶",
- "白練",
- "胡粉",
- "白鼠",
- "銀鼠",
- "鉛",
- "灰",
- "素鼠",
- "利休鼠",
- "鈍",
- "青鈍",
- "溝鼠",
- "紅消鼠",
- "藍墨茶",
- "檳榔子染",
- "消炭",
- "墨",
- "黒",
- "呂"
-], "pronunciations": [
- "nadeshiko",
- "kohbai",
- "suoh",
- "taikoh",
- "ikkonzome",
- "kuwazome",
- "momo",
- "ichigo",
- "usubeni",
- "imayoh",
- "nakabeni",
- "sakura",
- "umenezumi",
- "karakurenai",
- "enji",
- "kurenai",
- "toki",
- "cyohsyun",
- "kokiake",
- "sakuranezumi",
- "jinzamomi",
- "azuki",
- "suohkoh",
- "akabeni",
- "shinsyu",
- "haizakura",
- "kuriume",
- "ebicha",
- "ginsyu",
- "kurotobi",
- "benitobi",
- "akebono",
- "benikaba",
- "mizugaki",
- "sangosyu",
- "benihiwada",
- "syojyohi",
- "entan",
- "shikancha",
- "hiwada",
- "kakishibu",
- "ake",
- "tobi",
- "benihi",
- "kurikawacha",
- "bengara",
- "terigaki",
- "edocha",
- "araisyu",
- "momoshiocha",
- "karacha",
- "tokigaracha",
- "ohni",
- "sohi",
- "ensyucha",
- "kabacha",
- "kogecha",
- "akakoh",
- "suzumecha",
- "shishi",
- "sodenkaracha",
- "kaba",
- "kokikuchinashi",
- "kurumi",
- "taisya",
- "araigaki",
- "kohrozen",
- "akakuchiba",
- "tonocha",
- "akashirotsurubami",
- "sencha",
- "kanzo",
- "sharegaki",
- "beniukon",
- "umezome",
- "biwacha",
- "chojicha",
- "kenpohzome",
- "kohaku",
- "usugaki",
- "kyara",
- "chojizome",
- "fushizome",
- "kuchiba",
- "kincha",
- "kitsune",
- "susutake",
- "usukoh",
- "tonoko",
- "ginsusutake",
- "ohdo",
- "shiracha",
- "kobicha",
- "kigaracha",
- "yamabuki",
- "yamabukicha",
- "hajizome",
- "kuwacha",
- "tamago",
- "shirotsurubami",
- "kitsurubami",
- "tamamorokoshi",
- "hanaba",
- "namakabe",
- "torinoko",
- "usuki",
- "kikuchiba",
- "kuchinashi",
- "tohoh",
- "ukon",
- "karashi",
- "higosusutake",
- "rikyushiracha",
- "aku",
- "rikyucha",
- "rokohcha",
- "nataneyu",
- "uguisucha",
- "kimirucha",
- "mirucha",
- "kariyasu",
- "nanohana",
- "kihada",
- "mushikuri",
- "aokuchiba",
- "ominaeshi",
- "hiwacha",
- "hiwa",
- "uguisu",
- "yanagicha",
- "koke",
- "kikujin",
- "rikancha",
- "aikobicha",
- "miru",
- "sensaicha",
- "baikocha",
- "hiwamoegi",
- "yanagizome",
- "urayanagi",
- "iwaicha",
- "moegi",
- "nae",
- "yanagisusutake",
- "matsuba",
- "aoni",
- "usuao",
- "yanaginezumi",
- "tokiwa",
- "wakatake",
- "chitosemidori",
- "midori",
- "byakuroku",
- "oitake",
- "tokusa",
- "onandocha",
- "rokusyoh",
- "sabiseiji",
- "aotake",
- "veludo",
- "mushiao",
- "aimirucha",
- "tonocha2",
- "aomidori",
- "seiji",
- "tetsu",
- "mizuasagi",
- "seiheki",
- "sabitetsuonando",
- "korainando",
- "byakugun",
- "omeshicha",
- "kamenozoki",
- "fukagawanezumi",
- "sabiasagi",
- "mizu",
- "asagi",
- "onando",
- "ai",
- "shinbashi",
- "sabionando",
- "tetsuonando",
- "hanaasagi",
- "ainezumi",
- "masuhana",
- "sora",
- "noshimehana",
- "chigusa",
- "omeshionando",
- "hanada",
- "wasurenagusa",
- "gunjyo",
- "tsuyukusa",
- "kurotsurubami",
- "kon",
- "kachi",
- "ruri",
- "rurikon",
- "benimidori",
- "fujinezumi",
- "tetsukon",
- "konjyo",
- "benikakehana",
- "konkikyo",
- "fuji",
- "futaai",
- "ouchi",
- "fujimurasaki",
- "kikyo",
- "shion",
- "messhi",
- "usu",
- "hashita",
- "edomurasaki",
- "shikon",
- "kokimurasaki",
- "sumire",
- "murasaki",
- "ayame",
- "fujisusutake",
- "benifuji",
- "kurobeni",
- "nasukon",
- "budohnezumi",
- "hatobanezumi",
- "kakitsubata",
- "ebizome",
- "botan",
- "umemurasaki",
- "nisemurasaki",
- "tsutsuji",
- "murasakitobi",
- "shironeri",
- "gofun",
- "shironezumi",
- "ginnezumi",
- "namari",
- "hai",
- "sunezumi",
- "rikyunezumi",
- "nibi",
- "aonibi",
- "dobunezumi",
- "benikeshinezumi",
- "aisumicha",
- "binrojizome",
- "keshizumi",
- "sumi",
- "kuro",
- "ro"
-], "colors": [
- "DC9FB4",
- "E16B8C",
- "8E354A",
- "F8C3CD",
- "F4A7B9",
- "64363C",
- "F596AA",
- "B5495B",
- "E87A90",
- "D05A6E",
- "DB4D6D",
- "FEDFE1",
- "9E7A7A",
- "D0104C",
- "9F353A",
- "CB1B45",
- "EEA9A9",
- "BF6766",
- "86473F",
- "B19693",
- "EB7A77",
- "954A45",
- "A96360",
- "CB4042",
- "AB3B3A",
- "D7C4BB",
- "904840",
- "734338",
- "C73E3A",
- "554236",
- "994639",
- "F19483",
- "B54434",
- "B9887D",
- "F17C67",
- "884C3A",
- "E83015",
- "D75455",
- "B55D4C",
- "854836",
- "A35E47",
- "CC543A",
- "724832",
- "F75C2F",
- "6A4028",
- "9A5034",
- "C46243",
- "AF5F3C",
- "FB966E",
- "724938",
- "B47157",
- "DB8E71",
- "F05E1C",
- "ED784A",
- "CA7853",
- "B35C37",
- "563F2E",
- "E3916E",
- "8F5A3C",
- "F0A986",
- "A0674B",
- "C1693C",
- "FB9966",
- "947A6D",
- "A36336",
- "E79460",
- "7D532C",
- "C78550",
- "985F2A",
- "E1A679",
- "855B32",
- "FC9F4D",
- "FFBA84",
- "E98B2A",
- "E9A368",
- "B17844",
- "96632E",
- "43341B",
- "CA7A2C",
- "ECB88A",
- "78552B",
- "B07736",
- "967249",
- "E2943B",
- "C7802D",
- "9B6E23",
- "6E552F",
- "EBB471",
- "D7B98E",
- "82663A",
- "B68E55",
- "BC9F77",
- "876633",
- "C18A26",
- "FFB11B",
- "D19826",
- "DDA52D",
- "C99833",
- "F9BF45",
- "DCB879",
- "BA9132",
- "E8B647",
- "F7C242",
- "7D6C46",
- "DAC9A6",
- "FAD689",
- "D9AB42",
- "F6C555",
- "FFC408",
- "EFBB24",
- "CAAD5F",
- "8D742A",
- "B4A582",
- "877F6C",
- "897D55",
- "74673E",
- "A28C37",
- "6C6024",
- "867835",
- "62592C",
- "E9CD4C",
- "F7D94C",
- "FBE251",
- "D9CD90",
- "ADA142",
- "DDD23B",
- "A5A051",
- "BEC23F",
- "6C6A2D",
- "939650",
- "838A2D",
- "B1B479",
- "616138",
- "4B4E2A",
- "5B622E",
- "4D5139",
- "89916B",
- "90B44B",
- "91AD70",
- "B5CAA0",
- "646A58",
- "7BA23F",
- "86C166",
- "4A593D",
- "42602D",
- "516E41",
- "91B493",
- "808F7C",
- "1B813E",
- "5DAC81",
- "36563C",
- "227D51",
- "A8D8B9",
- "6A8372",
- "2D6D4B",
- "465D4C",
- "24936E",
- "86A697",
- "00896C",
- "096148",
- "20604F",
- "0F4C3A",
- "4F726C",
- "00AA90",
- "69B0AC",
- "26453D",
- "66BAB7",
- "268785",
- "405B55",
- "305A56",
- "78C2C4",
- "376B6D",
- "A5DEE4",
- "77969A",
- "6699A1",
- "81C7D4",
- "33A6B8",
- "0C4842",
- "0D5661",
- "0089A7",
- "336774",
- "255359",
- "1E88A8",
- "566C73",
- "577C8A",
- "58B2DC",
- "2B5F75",
- "3A8FB7",
- "2E5C6E",
- "006284",
- "7DB9DE",
- "51A8DD",
- "2EA9DF",
- "0B1013",
- "0F2540",
- "08192D",
- "005CAF",
- "0B346E",
- "7B90D2",
- "6E75A4",
- "261E47",
- "113285",
- "4E4F97",
- "211E55",
- "8B81C3",
- "70649A",
- "9B90C2",
- "8A6BBE",
- "6A4C9C",
- "8F77B5",
- "533D5B",
- "B28FCE",
- "986DB2",
- "77428D",
- "3C2F41",
- "4A225D",
- "66327C",
- "592C63",
- "6F3381",
- "574C57",
- "B481BB",
- "3F2B36",
- "572A3F",
- "5E3D50",
- "72636E",
- "622954",
- "6D2E5B",
- "C1328E",
- "A8497A",
- "562E37",
- "E03C8A",
- "60373E",
- "FCFAF2",
- "FFFFFB",
- "BDC0BA",
- "91989F",
- "787878",
- "828282",
- "787D7B",
- "707C74",
- "656765",
- "535953",
- "4F4F48",
- "52433D",
- "373C38",
- "3A3226",
- "434343",
- "1C1C1C",
- "080808",
- "0C0C0C"
-]}
diff --git a/src/main/resources/base/langs/ar.qm b/src/main/resources/base/langs/ar.qm
index da03731..c6ce8c1 100644
Binary files a/src/main/resources/base/langs/ar.qm and b/src/main/resources/base/langs/ar.qm differ
diff --git a/src/main/resources/base/langs/cs.qm b/src/main/resources/base/langs/cs.qm
index 6111213..24597a6 100644
Binary files a/src/main/resources/base/langs/cs.qm and b/src/main/resources/base/langs/cs.qm differ
diff --git a/src/main/resources/base/langs/da.qm b/src/main/resources/base/langs/da.qm
index 65a3cbd..49ed4ae 100644
Binary files a/src/main/resources/base/langs/da.qm and b/src/main/resources/base/langs/da.qm differ
diff --git a/src/main/resources/base/langs/de.qm b/src/main/resources/base/langs/de.qm
index 2e15ed2..ebe156f 100644
Binary files a/src/main/resources/base/langs/de.qm and b/src/main/resources/base/langs/de.qm differ
diff --git a/src/main/resources/base/langs/el.qm b/src/main/resources/base/langs/el.qm
index 642b794..b3a3410 100644
Binary files a/src/main/resources/base/langs/el.qm and b/src/main/resources/base/langs/el.qm differ
diff --git a/src/main/resources/base/langs/en.qm b/src/main/resources/base/langs/en.qm
index 695eb02..63b816c 100644
Binary files a/src/main/resources/base/langs/en.qm and b/src/main/resources/base/langs/en.qm differ
diff --git a/src/main/resources/base/langs/eo.qm b/src/main/resources/base/langs/eo.qm
index 6ba2af4..170352d 100644
Binary files a/src/main/resources/base/langs/eo.qm and b/src/main/resources/base/langs/eo.qm differ
diff --git a/src/main/resources/base/langs/es.qm b/src/main/resources/base/langs/es.qm
index a3266ab..597b1c2 100644
Binary files a/src/main/resources/base/langs/es.qm and b/src/main/resources/base/langs/es.qm differ
diff --git a/src/main/resources/base/langs/fi.qm b/src/main/resources/base/langs/fi.qm
index bccfcce..84948ea 100644
Binary files a/src/main/resources/base/langs/fi.qm and b/src/main/resources/base/langs/fi.qm differ
diff --git a/src/main/resources/base/langs/fr.qm b/src/main/resources/base/langs/fr.qm
index 07221ee..ad31700 100644
Binary files a/src/main/resources/base/langs/fr.qm and b/src/main/resources/base/langs/fr.qm differ
diff --git a/src/main/resources/base/langs/is.qm b/src/main/resources/base/langs/is.qm
index e455161..bcbd5c5 100644
Binary files a/src/main/resources/base/langs/is.qm and b/src/main/resources/base/langs/is.qm differ
diff --git a/src/main/resources/base/langs/it.qm b/src/main/resources/base/langs/it.qm
index 9abe2d9..2d8a563 100644
Binary files a/src/main/resources/base/langs/it.qm and b/src/main/resources/base/langs/it.qm differ
diff --git a/src/main/resources/base/langs/iw.qm b/src/main/resources/base/langs/iw.qm
index 1445994..9d2084a 100644
Binary files a/src/main/resources/base/langs/iw.qm and b/src/main/resources/base/langs/iw.qm differ
diff --git a/src/main/resources/base/langs/ja.qm b/src/main/resources/base/langs/ja.qm
index 05c3556..65cb085 100644
Binary files a/src/main/resources/base/langs/ja.qm and b/src/main/resources/base/langs/ja.qm differ
diff --git a/src/main/resources/base/langs/ko.qm b/src/main/resources/base/langs/ko.qm
index 350fa4c..457b4f3 100644
Binary files a/src/main/resources/base/langs/ko.qm and b/src/main/resources/base/langs/ko.qm differ
diff --git a/src/main/resources/base/langs/lt.qm b/src/main/resources/base/langs/lt.qm
index 18c3bc5..ceae2dd 100644
Binary files a/src/main/resources/base/langs/lt.qm and b/src/main/resources/base/langs/lt.qm differ
diff --git a/src/main/resources/base/langs/nl.qm b/src/main/resources/base/langs/nl.qm
index 9a93e04..9127f70 100644
Binary files a/src/main/resources/base/langs/nl.qm and b/src/main/resources/base/langs/nl.qm differ
diff --git a/src/main/resources/base/langs/no.qm b/src/main/resources/base/langs/no.qm
index e20d290..8befcaf 100644
Binary files a/src/main/resources/base/langs/no.qm and b/src/main/resources/base/langs/no.qm differ
diff --git a/src/main/resources/base/langs/ru.qm b/src/main/resources/base/langs/ru.qm
index af5c567..0497d0f 100644
Binary files a/src/main/resources/base/langs/ru.qm and b/src/main/resources/base/langs/ru.qm differ
diff --git a/src/main/resources/base/langs/sv.qm b/src/main/resources/base/langs/sv.qm
index 6c5cdd4..86c9c2c 100644
Binary files a/src/main/resources/base/langs/sv.qm and b/src/main/resources/base/langs/sv.qm differ
diff --git a/src/main/resources/base/langs/th.qm b/src/main/resources/base/langs/th.qm
index 9f4b76e..d540978 100644
Binary files a/src/main/resources/base/langs/th.qm and b/src/main/resources/base/langs/th.qm differ
diff --git a/src/main/resources/base/langs/vn.qm b/src/main/resources/base/langs/vn.qm
index 4bdc317..d9d83c2 100644
Binary files a/src/main/resources/base/langs/vn.qm and b/src/main/resources/base/langs/vn.qm differ
diff --git a/src/main/resources/base/langs/zh-Hant.qm b/src/main/resources/base/langs/zh-Hant.qm
index 11b35da..27ad6ec 100644
Binary files a/src/main/resources/base/langs/zh-Hant.qm and b/src/main/resources/base/langs/zh-Hant.qm differ
diff --git a/src/main/resources/base/langs/zh.qm b/src/main/resources/base/langs/zh.qm
index ebcadcd..94f10e2 100644
Binary files a/src/main/resources/base/langs/zh.qm and b/src/main/resources/base/langs/zh.qm differ