feat(tool): color converter
This commit is contained in:
		
							parent
							
								
									5f502755d6
								
							
						
					
					
						commit
						4e50b7a973
					
				
							
								
								
									
										396
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										396
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -15,6 +15,7 @@ | |||||||
|         "@vueuse/head": "^0.7.5", |         "@vueuse/head": "^0.7.5", | ||||||
|         "bip39": "^3.0.4", |         "bip39": "^3.0.4", | ||||||
|         "buffer": "^6.0.3", |         "buffer": "^6.0.3", | ||||||
|  |         "colord": "^2.9.2", | ||||||
|         "cron-validator": "^1.3.1", |         "cron-validator": "^1.3.1", | ||||||
|         "cronstrue": "^2.2.0", |         "cronstrue": "^2.2.0", | ||||||
|         "crypto-js": "^4.1.1", |         "crypto-js": "^4.1.1", | ||||||
| @ -3092,6 +3093,21 @@ | |||||||
|         "node": ">=4" |         "node": ">=4" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |     "node_modules/ansi-styles/node_modules/color-convert": { | ||||||
|  |       "version": "1.9.3", | ||||||
|  |       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", | ||||||
|  |       "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", | ||||||
|  |       "dev": true, | ||||||
|  |       "dependencies": { | ||||||
|  |         "color-name": "1.1.3" | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     "node_modules/ansi-styles/node_modules/color-name": { | ||||||
|  |       "version": "1.1.3", | ||||||
|  |       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", | ||||||
|  |       "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", | ||||||
|  |       "dev": true | ||||||
|  |     }, | ||||||
|     "node_modules/arch": { |     "node_modules/arch": { | ||||||
|       "version": "2.2.0", |       "version": "2.2.0", | ||||||
|       "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", |       "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz", | ||||||
| @ -3689,19 +3705,25 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/color-convert": { |     "node_modules/color-convert": { | ||||||
|       "version": "1.9.3", |       "version": "2.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", |       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", | ||||||
|       "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", |       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", | ||||||
|       "dev": true, |  | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "color-name": "1.1.3" |         "color-name": "~1.1.4" | ||||||
|  |       }, | ||||||
|  |       "engines": { | ||||||
|  |         "node": ">=7.0.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/color-name": { |     "node_modules/color-name": { | ||||||
|       "version": "1.1.3", |       "version": "1.1.4", | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", |       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", | ||||||
|       "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", |       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" | ||||||
|       "dev": true |     }, | ||||||
|  |     "node_modules/colord": { | ||||||
|  |       "version": "2.9.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz", | ||||||
|  |       "integrity": "sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ==" | ||||||
|     }, |     }, | ||||||
|     "node_modules/colorette": { |     "node_modules/colorette": { | ||||||
|       "version": "2.0.16", |       "version": "2.0.16", | ||||||
| @ -4119,24 +4141,6 @@ | |||||||
|         "node": ">=8" |         "node": ">=8" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/cypress/node_modules/color-convert": { |  | ||||||
|       "version": "2.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|       "dev": true, |  | ||||||
|       "dependencies": { |  | ||||||
|         "color-name": "~1.1.4" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=7.0.0" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/cypress/node_modules/color-name": { |  | ||||||
|       "version": "1.1.4", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|       "dev": true |  | ||||||
|     }, |  | ||||||
|     "node_modules/cypress/node_modules/has-flag": { |     "node_modules/cypress/node_modules/has-flag": { | ||||||
|       "version": "4.0.0", |       "version": "4.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||||||
| @ -5226,24 +5230,6 @@ | |||||||
|         "url": "https://github.com/chalk/chalk?sponsor=1" |         "url": "https://github.com/chalk/chalk?sponsor=1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/eslint/node_modules/color-convert": { |  | ||||||
|       "version": "2.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|       "dev": true, |  | ||||||
|       "dependencies": { |  | ||||||
|         "color-name": "~1.1.4" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=7.0.0" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/eslint/node_modules/color-name": { |  | ||||||
|       "version": "1.1.4", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|       "dev": true |  | ||||||
|     }, |  | ||||||
|     "node_modules/eslint/node_modules/escape-string-regexp": { |     "node_modules/eslint/node_modules/escape-string-regexp": { | ||||||
|       "version": "4.0.0", |       "version": "4.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", |       "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", | ||||||
| @ -6828,24 +6814,6 @@ | |||||||
|         "url": "https://github.com/chalk/chalk?sponsor=1" |         "url": "https://github.com/chalk/chalk?sponsor=1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/jake/node_modules/color-convert": { |  | ||||||
|       "version": "2.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|       "dev": true, |  | ||||||
|       "dependencies": { |  | ||||||
|         "color-name": "~1.1.4" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=7.0.0" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/jake/node_modules/color-name": { |  | ||||||
|       "version": "1.1.4", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|       "dev": true |  | ||||||
|     }, |  | ||||||
|     "node_modules/jake/node_modules/has-flag": { |     "node_modules/jake/node_modules/has-flag": { | ||||||
|       "version": "4.0.0", |       "version": "4.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||||||
| @ -6910,22 +6878,6 @@ | |||||||
|         "url": "https://github.com/chalk/chalk?sponsor=1" |         "url": "https://github.com/chalk/chalk?sponsor=1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/jest-diff/node_modules/color-convert": { |  | ||||||
|       "version": "2.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|       "dependencies": { |  | ||||||
|         "color-name": "~1.1.4" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=7.0.0" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/jest-diff/node_modules/color-name": { |  | ||||||
|       "version": "1.1.4", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" |  | ||||||
|     }, |  | ||||||
|     "node_modules/jest-diff/node_modules/has-flag": { |     "node_modules/jest-diff/node_modules/has-flag": { | ||||||
|       "version": "4.0.0", |       "version": "4.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||||||
| @ -6996,22 +6948,6 @@ | |||||||
|         "url": "https://github.com/chalk/chalk?sponsor=1" |         "url": "https://github.com/chalk/chalk?sponsor=1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/jest-matcher-utils/node_modules/color-convert": { |  | ||||||
|       "version": "2.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|       "dependencies": { |  | ||||||
|         "color-name": "~1.1.4" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=7.0.0" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/jest-matcher-utils/node_modules/color-name": { |  | ||||||
|       "version": "1.1.4", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" |  | ||||||
|     }, |  | ||||||
|     "node_modules/jest-matcher-utils/node_modules/has-flag": { |     "node_modules/jest-matcher-utils/node_modules/has-flag": { | ||||||
|       "version": "4.0.0", |       "version": "4.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||||||
| @ -7517,24 +7453,6 @@ | |||||||
|         "url": "https://github.com/chalk/chalk?sponsor=1" |         "url": "https://github.com/chalk/chalk?sponsor=1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/log-symbols/node_modules/color-convert": { |  | ||||||
|       "version": "2.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|       "dev": true, |  | ||||||
|       "dependencies": { |  | ||||||
|         "color-name": "~1.1.4" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=7.0.0" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/log-symbols/node_modules/color-name": { |  | ||||||
|       "version": "1.1.4", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|       "dev": true |  | ||||||
|     }, |  | ||||||
|     "node_modules/log-symbols/node_modules/has-flag": { |     "node_modules/log-symbols/node_modules/has-flag": { | ||||||
|       "version": "4.0.0", |       "version": "4.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||||||
| @ -7589,24 +7507,6 @@ | |||||||
|         "url": "https://github.com/chalk/ansi-styles?sponsor=1" |         "url": "https://github.com/chalk/ansi-styles?sponsor=1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/log-update/node_modules/color-convert": { |  | ||||||
|       "version": "2.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|       "dev": true, |  | ||||||
|       "dependencies": { |  | ||||||
|         "color-name": "~1.1.4" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=7.0.0" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/log-update/node_modules/color-name": { |  | ||||||
|       "version": "1.1.4", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|       "dev": true |  | ||||||
|     }, |  | ||||||
|     "node_modules/log-update/node_modules/slice-ansi": { |     "node_modules/log-update/node_modules/slice-ansi": { | ||||||
|       "version": "4.0.0", |       "version": "4.0.0", | ||||||
|       "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", |       "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", | ||||||
| @ -8631,22 +8531,6 @@ | |||||||
|         "wrap-ansi": "^6.2.0" |         "wrap-ansi": "^6.2.0" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/qrcode/node_modules/color-convert": { |  | ||||||
|       "version": "2.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|       "dependencies": { |  | ||||||
|         "color-name": "~1.1.4" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=7.0.0" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/qrcode/node_modules/color-name": { |  | ||||||
|       "version": "1.1.4", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" |  | ||||||
|     }, |  | ||||||
|     "node_modules/qrcode/node_modules/find-up": { |     "node_modules/qrcode/node_modules/find-up": { | ||||||
|       "version": "4.1.0", |       "version": "4.1.0", | ||||||
|       "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", |       "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", | ||||||
| @ -9249,24 +9133,6 @@ | |||||||
|         "url": "https://github.com/chalk/ansi-styles?sponsor=1" |         "url": "https://github.com/chalk/ansi-styles?sponsor=1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/slice-ansi/node_modules/color-convert": { |  | ||||||
|       "version": "2.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|       "dev": true, |  | ||||||
|       "dependencies": { |  | ||||||
|         "color-name": "~1.1.4" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=7.0.0" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/slice-ansi/node_modules/color-name": { |  | ||||||
|       "version": "1.1.4", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|       "dev": true |  | ||||||
|     }, |  | ||||||
|     "node_modules/source-map": { |     "node_modules/source-map": { | ||||||
|       "version": "0.5.7", |       "version": "0.5.7", | ||||||
|       "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", |       "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", | ||||||
| @ -11026,24 +10892,6 @@ | |||||||
|         "url": "https://github.com/chalk/ansi-styles?sponsor=1" |         "url": "https://github.com/chalk/ansi-styles?sponsor=1" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/wrap-ansi/node_modules/color-convert": { |  | ||||||
|       "version": "2.0.1", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|       "dev": true, |  | ||||||
|       "dependencies": { |  | ||||||
|         "color-name": "~1.1.4" |  | ||||||
|       }, |  | ||||||
|       "engines": { |  | ||||||
|         "node": ">=7.0.0" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "node_modules/wrap-ansi/node_modules/color-name": { |  | ||||||
|       "version": "1.1.4", |  | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|       "dev": true |  | ||||||
|     }, |  | ||||||
|     "node_modules/wrappy": { |     "node_modules/wrappy": { | ||||||
|       "version": "1.0.2", |       "version": "1.0.2", | ||||||
|       "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", |       "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", | ||||||
| @ -13384,6 +13232,23 @@ | |||||||
|       "dev": true, |       "dev": true, | ||||||
|       "requires": { |       "requires": { | ||||||
|         "color-convert": "^1.9.0" |         "color-convert": "^1.9.0" | ||||||
|  |       }, | ||||||
|  |       "dependencies": { | ||||||
|  |         "color-convert": { | ||||||
|  |           "version": "1.9.3", | ||||||
|  |           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", | ||||||
|  |           "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", | ||||||
|  |           "dev": true, | ||||||
|  |           "requires": { | ||||||
|  |             "color-name": "1.1.3" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         "color-name": { | ||||||
|  |           "version": "1.1.3", | ||||||
|  |           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", | ||||||
|  |           "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", | ||||||
|  |           "dev": true | ||||||
|  |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "arch": { |     "arch": { | ||||||
| @ -13825,19 +13690,22 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "color-convert": { |     "color-convert": { | ||||||
|       "version": "1.9.3", |       "version": "2.0.1", | ||||||
|       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", |       "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", | ||||||
|       "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", |       "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", | ||||||
|       "dev": true, |  | ||||||
|       "requires": { |       "requires": { | ||||||
|         "color-name": "1.1.3" |         "color-name": "~1.1.4" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "color-name": { |     "color-name": { | ||||||
|       "version": "1.1.3", |       "version": "1.1.4", | ||||||
|       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", |       "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", | ||||||
|       "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", |       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" | ||||||
|       "dev": true |     }, | ||||||
|  |     "colord": { | ||||||
|  |       "version": "2.9.2", | ||||||
|  |       "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz", | ||||||
|  |       "integrity": "sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ==" | ||||||
|     }, |     }, | ||||||
|     "colorette": { |     "colorette": { | ||||||
|       "version": "2.0.16", |       "version": "2.0.16", | ||||||
| @ -14180,21 +14048,6 @@ | |||||||
|             } |             } | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         "color-convert": { |  | ||||||
|           "version": "2.0.1", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|           "dev": true, |  | ||||||
|           "requires": { |  | ||||||
|             "color-name": "~1.1.4" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "color-name": { |  | ||||||
|           "version": "1.1.4", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|           "dev": true |  | ||||||
|         }, |  | ||||||
|         "has-flag": { |         "has-flag": { | ||||||
|           "version": "4.0.0", |           "version": "4.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||||||
| @ -14836,21 +14689,6 @@ | |||||||
|             "supports-color": "^7.1.0" |             "supports-color": "^7.1.0" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         "color-convert": { |  | ||||||
|           "version": "2.0.1", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|           "dev": true, |  | ||||||
|           "requires": { |  | ||||||
|             "color-name": "~1.1.4" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "color-name": { |  | ||||||
|           "version": "1.1.4", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|           "dev": true |  | ||||||
|         }, |  | ||||||
|         "escape-string-regexp": { |         "escape-string-regexp": { | ||||||
|           "version": "4.0.0", |           "version": "4.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", |           "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", | ||||||
| @ -16055,21 +15893,6 @@ | |||||||
|             "supports-color": "^7.1.0" |             "supports-color": "^7.1.0" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         "color-convert": { |  | ||||||
|           "version": "2.0.1", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|           "dev": true, |  | ||||||
|           "requires": { |  | ||||||
|             "color-name": "~1.1.4" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "color-name": { |  | ||||||
|           "version": "1.1.4", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|           "dev": true |  | ||||||
|         }, |  | ||||||
|         "has-flag": { |         "has-flag": { | ||||||
|           "version": "4.0.0", |           "version": "4.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||||||
| @ -16115,19 +15938,6 @@ | |||||||
|             "supports-color": "^7.1.0" |             "supports-color": "^7.1.0" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         "color-convert": { |  | ||||||
|           "version": "2.0.1", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|           "requires": { |  | ||||||
|             "color-name": "~1.1.4" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "color-name": { |  | ||||||
|           "version": "1.1.4", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" |  | ||||||
|         }, |  | ||||||
|         "has-flag": { |         "has-flag": { | ||||||
|           "version": "4.0.0", |           "version": "4.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||||||
| @ -16176,19 +15986,6 @@ | |||||||
|             "supports-color": "^7.1.0" |             "supports-color": "^7.1.0" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         "color-convert": { |  | ||||||
|           "version": "2.0.1", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|           "requires": { |  | ||||||
|             "color-name": "~1.1.4" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "color-name": { |  | ||||||
|           "version": "1.1.4", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" |  | ||||||
|         }, |  | ||||||
|         "has-flag": { |         "has-flag": { | ||||||
|           "version": "4.0.0", |           "version": "4.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||||||
| @ -16580,21 +16377,6 @@ | |||||||
|             "supports-color": "^7.1.0" |             "supports-color": "^7.1.0" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         "color-convert": { |  | ||||||
|           "version": "2.0.1", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|           "dev": true, |  | ||||||
|           "requires": { |  | ||||||
|             "color-name": "~1.1.4" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "color-name": { |  | ||||||
|           "version": "1.1.4", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|           "dev": true |  | ||||||
|         }, |  | ||||||
|         "has-flag": { |         "has-flag": { | ||||||
|           "version": "4.0.0", |           "version": "4.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |           "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", | ||||||
| @ -16633,21 +16415,6 @@ | |||||||
|             "color-convert": "^2.0.1" |             "color-convert": "^2.0.1" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         "color-convert": { |  | ||||||
|           "version": "2.0.1", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|           "dev": true, |  | ||||||
|           "requires": { |  | ||||||
|             "color-name": "~1.1.4" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "color-name": { |  | ||||||
|           "version": "1.1.4", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|           "dev": true |  | ||||||
|         }, |  | ||||||
|         "slice-ansi": { |         "slice-ansi": { | ||||||
|           "version": "4.0.0", |           "version": "4.0.0", | ||||||
|           "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", |           "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", | ||||||
| @ -17429,19 +17196,6 @@ | |||||||
|             "wrap-ansi": "^6.2.0" |             "wrap-ansi": "^6.2.0" | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         "color-convert": { |  | ||||||
|           "version": "2.0.1", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|           "requires": { |  | ||||||
|             "color-name": "~1.1.4" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "color-name": { |  | ||||||
|           "version": "1.1.4", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" |  | ||||||
|         }, |  | ||||||
|         "find-up": { |         "find-up": { | ||||||
|           "version": "4.1.0", |           "version": "4.1.0", | ||||||
|           "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", |           "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", | ||||||
| @ -17895,21 +17649,6 @@ | |||||||
|           "requires": { |           "requires": { | ||||||
|             "color-convert": "^2.0.1" |             "color-convert": "^2.0.1" | ||||||
|           } |           } | ||||||
|         }, |  | ||||||
|         "color-convert": { |  | ||||||
|           "version": "2.0.1", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|           "dev": true, |  | ||||||
|           "requires": { |  | ||||||
|             "color-name": "~1.1.4" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "color-name": { |  | ||||||
|           "version": "1.1.4", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|           "dev": true |  | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
| @ -19275,21 +19014,6 @@ | |||||||
|           "requires": { |           "requires": { | ||||||
|             "color-convert": "^2.0.1" |             "color-convert": "^2.0.1" | ||||||
|           } |           } | ||||||
|         }, |  | ||||||
|         "color-convert": { |  | ||||||
|           "version": "2.0.1", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |  | ||||||
|           "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |  | ||||||
|           "dev": true, |  | ||||||
|           "requires": { |  | ||||||
|             "color-name": "~1.1.4" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         "color-name": { |  | ||||||
|           "version": "1.1.4", |  | ||||||
|           "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |  | ||||||
|           "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |  | ||||||
|           "dev": true |  | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -21,6 +21,7 @@ | |||||||
|     "@vueuse/head": "^0.7.5", |     "@vueuse/head": "^0.7.5", | ||||||
|     "bip39": "^3.0.4", |     "bip39": "^3.0.4", | ||||||
|     "buffer": "^6.0.3", |     "buffer": "^6.0.3", | ||||||
|  |     "colord": "^2.9.2", | ||||||
|     "cron-validator": "^1.3.1", |     "cron-validator": "^1.3.1", | ||||||
|     "cronstrue": "^2.2.0", |     "cronstrue": "^2.2.0", | ||||||
|     "crypto-js": "^4.1.1", |     "crypto-js": "^4.1.1", | ||||||
|  | |||||||
| @ -0,0 +1,6 @@ | |||||||
|  | import { expect, describe, it } from 'vitest'; | ||||||
|  | // import { } from './color-converter.service';
 | ||||||
|  | //
 | ||||||
|  | // describe('color-converter', () => {
 | ||||||
|  | //
 | ||||||
|  | // })
 | ||||||
							
								
								
									
										63
									
								
								src/tools/color-converter/color-converter.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								src/tools/color-converter/color-converter.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,63 @@ | |||||||
|  | <template> | ||||||
|  |   <n-card> | ||||||
|  |     <n-form label-width="100" label-placement="left"> | ||||||
|  |       <n-form-item label="color picker:"> | ||||||
|  |         <n-color-picker v-model:value="hex" @update:value="(v: string) => onInputUpdated(v, 'hex')" | ||||||
|  |           placement="bottom-end" /> | ||||||
|  |       </n-form-item> | ||||||
|  |       <n-form-item label="color name:"> | ||||||
|  |         <n-input v-model:value="name" :on-input="(v: string) => onInputUpdated(v, 'name')" /> | ||||||
|  |       </n-form-item> | ||||||
|  |       <n-form-item label="hex:"> | ||||||
|  |         <n-input v-model:value="hex" :on-input="(v: string) => onInputUpdated(v, 'hex')" /> | ||||||
|  |       </n-form-item> | ||||||
|  |       <n-form-item label="rgb:"> | ||||||
|  |         <n-input v-model:value="rgb" :on-input="(v: string) => onInputUpdated(v, 'rgb')" /> | ||||||
|  |       </n-form-item> | ||||||
|  |       <n-form-item label="hsl:"> | ||||||
|  |         <n-input v-model:value="hsl" :on-input="(v: string) => onInputUpdated(v, 'hsl')" /> | ||||||
|  |       </n-form-item> | ||||||
|  |       <n-form-item label="hwb:"> | ||||||
|  |         <n-input v-model:value="hwb" :on-input="(v: string) => onInputUpdated(v, 'hwb')" /> | ||||||
|  |       </n-form-item> | ||||||
|  |       <n-form-item label="cmyk:"> | ||||||
|  |         <n-input v-model:value="cmyk" :on-input="(v: string) => onInputUpdated(v, 'cmyk')" /> | ||||||
|  |       </n-form-item> | ||||||
|  |     </n-form> | ||||||
|  |   </n-card> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script setup lang="ts"> | ||||||
|  | import { ref } from 'vue'; | ||||||
|  | import { colord, extend } from "colord"; | ||||||
|  | 
 | ||||||
|  | import cmykPlugin from "colord/plugins/cmyk"; | ||||||
|  | import hwbPlugin from "colord/plugins/hwb"; | ||||||
|  | import namesPlugin from "colord/plugins/names"; | ||||||
|  | 
 | ||||||
|  | extend([cmykPlugin, hwbPlugin, namesPlugin]); | ||||||
|  | 
 | ||||||
|  | const name = ref('') | ||||||
|  | const hex = ref('#1ea54cff') | ||||||
|  | const rgb = ref('') | ||||||
|  | const hsl = ref('') | ||||||
|  | const hwb = ref('') | ||||||
|  | const cmyk = ref('') | ||||||
|  | 
 | ||||||
|  | function onInputUpdated(value: string, omit: string) { | ||||||
|  |   const color = colord(value); | ||||||
|  | 
 | ||||||
|  |   omit !== 'name' && (name.value = color.toName({ closest: true }) ?? ''); | ||||||
|  |   omit !== 'hex' && (hex.value = color.toHex()); | ||||||
|  |   omit !== 'rgb' && (rgb.value = color.toRgbString()); | ||||||
|  |   omit !== 'hsl' && (hsl.value = color.toHslString()); | ||||||
|  |   omit !== 'hwb' && (hwb.value = color.toHwbString()); | ||||||
|  |   omit !== 'cmyk' && (cmyk.value = color.toCmykString()); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | onInputUpdated(hex.value, 'hex') | ||||||
|  | 
 | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style lang="less" scoped> | ||||||
|  | </style> | ||||||
							
								
								
									
										11
									
								
								src/tools/color-converter/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								src/tools/color-converter/index.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | |||||||
|  | import { Palette } from '@vicons/tabler'; | ||||||
|  | import type { ITool } from './../Tool'; | ||||||
|  | 
 | ||||||
|  | export const tool: ITool = { | ||||||
|  |   name: 'Color converter', | ||||||
|  |   path: '/color-converter', | ||||||
|  |   description: 'Convert color between the different formats (hex, rgb, hsl and css name)', | ||||||
|  |   keywords: ['color', 'converter'], | ||||||
|  |   component: () => import('./color-converter.vue'), | ||||||
|  |   icon: Palette, | ||||||
|  | }; | ||||||
| @ -1,6 +1,7 @@ | |||||||
| import { LockOpen } from '@vicons/tabler'; | import { LockOpen } from '@vicons/tabler'; | ||||||
| import type { ToolCategory } from './Tool'; | import type { ToolCategory } from './Tool'; | ||||||
| 
 | 
 | ||||||
|  | import { tool as colorConverter } from './color-converter'; | ||||||
| import { tool as qrCodeGenerator } from './qr-code-generator'; | import { tool as qrCodeGenerator } from './qr-code-generator'; | ||||||
| import { tool as base64Converter } from './base64-converter'; | import { tool as base64Converter } from './base64-converter'; | ||||||
| import { tool as crontabGenerator } from './crontab-generator'; | import { tool as crontabGenerator } from './crontab-generator'; | ||||||
| @ -27,7 +28,7 @@ export const toolsByCategory: ToolCategory[] = [ | |||||||
|   { |   { | ||||||
|     name: 'Converter', |     name: 'Converter', | ||||||
|     icon: LockOpen, |     icon: LockOpen, | ||||||
|     components: [dateTimeConverter, baseConverter, romanNumeralConverter, base64Converter], |     components: [dateTimeConverter, baseConverter, romanNumeralConverter, base64Converter, colorConverter], | ||||||
|   }, |   }, | ||||||
|   { |   { | ||||||
|     name: 'Web', |     name: 'Web', | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user