├── .gitignore ├── Cargo.toml ├── flake.nix ├── src ├── main.rs ├── cli.rs ├── lib.rs ├── colors.rs └── colors │ └── named_colors.rs ├── license ├── .github └── workflows │ └── nix.yml ├── flake.lock ├── readme.md └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "uwu_colors" 3 | version = "0.4.0" 4 | edition = "2024" 5 | description = "simple language server to colorize hex color strings via textDocument/documentColor" 6 | repository = "https://codeberg.org/q60/uwu_colors" 7 | license = "Unlicense" 8 | readme = "readme.md" 9 | 10 | [profile.release] 11 | opt-level = 3 12 | lto = "fat" 13 | codegen-units = 1 14 | panic = "abort" 15 | strip = true 16 | 17 | [dependencies] 18 | argh = "0.1.13" 19 | dashmap = "6.1.0" 20 | fancy-regex = "0.14.0" 21 | tokio = { version = "1.44.1", features = ["full"] } 22 | tower-lsp = "0.20.0" 23 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "uwu_colors"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 6 | utils.url = "github:numtide/flake-utils"; 7 | }; 8 | 9 | nixConfig = { 10 | extra-substituters = [ 11 | "https://kira.cachix.org/" 12 | ]; 13 | 14 | extra-trusted-public-keys = [ 15 | "kira.cachix.org-1:THBrq/BplPxOJnWnxCBMOeP03ReON+FUYZpiDTnZqwA=" 16 | ]; 17 | }; 18 | 19 | outputs = { 20 | self, 21 | nixpkgs, 22 | utils, 23 | }: 24 | { 25 | overlays.default = final: prev: { 26 | uwu-colors = self.packages.${final.system}.default; 27 | }; 28 | } 29 | // utils.lib.eachDefaultSystem 30 | (system: let 31 | pkgs = import nixpkgs {inherit system;}; 32 | in { 33 | packages = { 34 | default = pkgs.rustPlatform.buildRustPackage { 35 | name = "uwu_colors"; 36 | 37 | nativeBuildInputs = [ 38 | pkgs.clippy 39 | ]; 40 | 41 | cargoLock.lockFile = ./Cargo.lock; 42 | src = pkgs.lib.cleanSource ./.; 43 | }; 44 | }; 45 | 46 | apps.default = utils.lib.mkApp {drv = self.packages.${system}.default;}; 47 | }); 48 | } 49 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | mod cli; 2 | 3 | use cli::Config; 4 | use uwu_colors::Backend; 5 | use uwu_colors::colors; 6 | 7 | use dashmap::DashMap; 8 | use fancy_regex::Regex; 9 | use tower_lsp::LspService; 10 | use tower_lsp::Server; 11 | 12 | const COLOR_REGEX: &str = 13 | r#"(["'])\#([0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{4}|[0-9a-fA-F]{3})\1"#; 14 | 15 | #[tokio::main] 16 | async fn main() { 17 | let config = Config::new(); 18 | 19 | if config.version { 20 | println!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION")); 21 | 22 | return; 23 | } 24 | 25 | let stdin = tokio::io::stdin(); 26 | let stdout = tokio::io::stdout(); 27 | 28 | let documents = DashMap::new(); 29 | let color_regex = Regex::new(COLOR_REGEX).unwrap(); 30 | let color_completions = 31 | colors::named_colors_completions(&config.named_completions_mode, &config.color_collection); 32 | 33 | let (service, socket) = LspService::new(|client| Backend { 34 | client, 35 | documents, 36 | color_regex, 37 | color_completions, 38 | variable_completions: config.variable_completions, 39 | }); 40 | 41 | Server::new(stdin, stdout, socket).serve(service).await; 42 | } 43 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /.github/workflows/nix.yml: -------------------------------------------------------------------------------- 1 | name: "cachix" 2 | on: 3 | push: 4 | jobs: 5 | build: 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v4 9 | - name: install nix 10 | uses: cachix/install-nix-action@v25 11 | with: 12 | nix_path: nixpkgs=channel:nixos-unstable 13 | - name: test 14 | run: | 15 | cargo test 16 | - name: install cachix 17 | run: | 18 | nix profile install nixpkgs#cachix 19 | - name: install jq 20 | run: | 21 | nix profile install nixpkgs#jq 22 | - name: build & push 23 | run: | 24 | nix build --json \ 25 | | jq -r '.[].outputs | to_entries[].value' \ 26 | | cachix push kira 27 | env: 28 | CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_AUTH_TOKEN }}' 29 | 30 | build-aarch64: 31 | runs-on: ubuntu-24.04-arm 32 | steps: 33 | - uses: actions/checkout@v4 34 | - name: install nix 35 | uses: cachix/install-nix-action@v25 36 | with: 37 | nix_path: nixpkgs=channel:nixos-unstable 38 | - name: test 39 | run: | 40 | cargo test 41 | - name: install cachix 42 | run: | 43 | nix profile install nixpkgs#cachix 44 | - name: install jq 45 | run: | 46 | nix profile install nixpkgs#jq 47 | - name: build & push 48 | run: | 49 | nix build --json \ 50 | | jq -r '.[].outputs | to_entries[].value' \ 51 | | cachix push kira 52 | env: 53 | CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_AUTH_TOKEN }}' 54 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1742669843, 6 | "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", 7 | "owner": "nixos", 8 | "repo": "nixpkgs", 9 | "rev": "1e5b653dff12029333a6546c11e108ede13052eb", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "owner": "nixos", 14 | "ref": "nixos-unstable", 15 | "repo": "nixpkgs", 16 | "type": "github" 17 | } 18 | }, 19 | "root": { 20 | "inputs": { 21 | "nixpkgs": "nixpkgs", 22 | "utils": "utils" 23 | } 24 | }, 25 | "systems": { 26 | "locked": { 27 | "lastModified": 1681028828, 28 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 29 | "owner": "nix-systems", 30 | "repo": "default", 31 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 32 | "type": "github" 33 | }, 34 | "original": { 35 | "owner": "nix-systems", 36 | "repo": "default", 37 | "type": "github" 38 | } 39 | }, 40 | "utils": { 41 | "inputs": { 42 | "systems": "systems" 43 | }, 44 | "locked": { 45 | "lastModified": 1731533236, 46 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 47 | "owner": "numtide", 48 | "repo": "flake-utils", 49 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 50 | "type": "github" 51 | }, 52 | "original": { 53 | "owner": "numtide", 54 | "repo": "flake-utils", 55 | "type": "github" 56 | } 57 | } 58 | }, 59 | "root": "root", 60 | "version": 7 61 | } 62 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # uwu-colors 2 | 3 | [![Crates.io Version](https://img.shields.io/crates/v/uwu_colors?style=for-the-badge)](https://crates.io/crates/uwu_colors) 4 | 5 | a simple language server that i made mainly for helix because of https://github.com/helix-editor/helix/pull/12308 6 | 7 | ![first screenshot demonstrating usage in a nix file inside helix](https://i.imgur.com/h1R35Gq.png) 8 | 9 | ![second screenshot demonstrating variable completions](https://i.imgur.com/xfUVAVB.png) 10 | 11 | ![third screenshot demonstrating help message](https://i.imgur.com/lrPDcDR.png) 12 | 13 | 14 | ## features 15 | 16 | `uwu-colors` sends `textDocument/documentColor` request on hex color strings like `"#ABC"`, `"#abcd"`, `'#AaBbCc'`, `'#AABBCCDD'` 17 | 18 | it also provides various completions 19 | 20 | 21 | ### completions 22 | 23 | named color completions are enabled by default - uppercase hex colors from https://www.colorhexa.com/color-names 24 | 25 | variable completions can be enabled using a flag 26 | 27 | 28 | #### options and flags 29 | 30 | `--named-completions-mode`: 31 | - `upper` completes with uppercase hex strings 32 | - `lower` - with lowercase strings 33 | - `full` - both with lowercase strings and uppercase strings using uppercase names 34 | - `none` disables completions 35 | 36 | `--color-collection`: 37 | - `colorhexa` - named colors from ColorHexa 38 | - `css` - named CSS colors 39 | 40 | `--variable-completions` - enables variable completions like on the second screenshot 41 | 42 | 43 | ## installation 44 | 45 | ### you can use it as a flake 46 | 47 | 1. add it to your system's inputs 48 | 2. overlay it 49 | - as `inputs.uwu-colors.overlays.default` 50 | - *or* using packages overlay as `inputs.uwu-colors.packages.${pkgs.system}.default` 51 | 3. add it to helix language server configuration with command `"${pkgs.uwu-colors}/bin/uwu_colors"` 52 | 4. add it to your languages of needs 53 | 54 | 55 | ### from crates.io 56 | 57 | preferred way on a system w/o nix - `cargo install uwu_colors` 58 | 59 | 60 | ### binary from releases 61 | 62 | grab an x86_64 binary from github [releases](https://github.com/q60/uwu_colors/releases) 63 | 64 | 65 | ### packaging status 66 | 67 | [![repology packaging status](https://repology.org/badge/vertical-allrepos/uwu-colors.svg)](https://repology.org/project/uwu-colors/versions) 68 | -------------------------------------------------------------------------------- /src/cli.rs: -------------------------------------------------------------------------------- 1 | //! This module is responsible for command line arguments deserialization and [`Config`] building. 2 | 3 | use crate::colors::CompletionsMode; 4 | use crate::colors::NamedColors; 5 | 6 | use argh::FromArgs; 7 | 8 | /// Hex color language server 9 | #[derive(FromArgs)] 10 | #[argh(help_triggers("-h", "--help", "help"))] 11 | struct Args { 12 | /// enable color variables completions 13 | #[argh(switch, short = 'a')] 14 | variable_completions: bool, 15 | 16 | /// mode of named colors completions, can be one of: full, none, upper, lower. default: upper 17 | #[argh(option, short = 'c', default = r#""upper".to_string()"#)] 18 | named_completions_mode: String, 19 | 20 | /// color collection used for completions, can be one of: css, colorhexa. default: colorhexa 21 | #[argh(option, short = 'o', default = r#""colorhexa".to_string()"#)] 22 | color_collection: String, 23 | 24 | /// version 25 | #[argh(switch, short = 'V')] 26 | version: bool, 27 | } 28 | 29 | /// Configuration struct based on CLI args. 30 | pub struct Config { 31 | pub variable_completions: bool, 32 | 33 | /// CSS named colors completions mode. 34 | pub named_completions_mode: CompletionsMode, 35 | 36 | /// ColorHexa colors by name. 37 | pub color_collection: NamedColors, 38 | 39 | /// version flag. 40 | pub version: bool, 41 | } 42 | 43 | impl Config { 44 | /// Creates a new [`Config`] from CLI args. 45 | pub fn new() -> Self { 46 | let args: Args = argh::from_env(); 47 | 48 | Self { 49 | variable_completions: args.variable_completions, 50 | named_completions_mode: match args.named_completions_mode.to_lowercase().as_str() { 51 | "none" => CompletionsMode::None, 52 | "upper" => CompletionsMode::Uppercase, 53 | "lower" => CompletionsMode::Lowercase, 54 | _ => CompletionsMode::Full, 55 | }, 56 | color_collection: match args.color_collection.to_lowercase().as_str() { 57 | "colorhexa" => NamedColors::ColorHexa, 58 | _ => NamedColors::Css, 59 | }, 60 | version: args.version, 61 | } 62 | } 63 | } 64 | 65 | impl Default for Config { 66 | fn default() -> Self { 67 | Self::new() 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![doc = include_str!("../readme.md")] 2 | 3 | pub mod colors; 4 | 5 | use dashmap::DashMap; 6 | use fancy_regex::Regex; 7 | use tower_lsp::Client; 8 | use tower_lsp::LanguageServer; 9 | use tower_lsp::jsonrpc::Error; 10 | use tower_lsp::jsonrpc::Result; 11 | 12 | #[allow(clippy::wildcard_imports, reason = "there is a ton of types")] 13 | use tower_lsp::lsp_types::*; 14 | 15 | const INDENTED_HASH_REGEX: &str = r"^\s+#"; 16 | const VARIABLE_REGEX: &str = r#"^([a-zA-Z_]+)\s*=\s*(["'])\#([0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{4}|[0-9a-fA-F]{3})\2"#; 17 | 18 | /// Backend structure. 19 | #[derive(Debug)] 20 | pub struct Backend { 21 | /// LSP client. 22 | pub client: Client, 23 | 24 | /// Contains all opened documents (files). 25 | pub documents: DashMap, 26 | 27 | /// Regex to find colors in files. 28 | pub color_regex: Regex, 29 | 30 | /// Variable completions toggle. 31 | pub variable_completions: bool, 32 | 33 | /// CSS named colors completions. 34 | pub color_completions: Option>, 35 | } 36 | 37 | #[tower_lsp::async_trait] 38 | impl LanguageServer for Backend { 39 | /// Initialize request handler. Initializes the language server with parameters. 40 | async fn initialize(&self, _: InitializeParams) -> Result { 41 | Ok(InitializeResult { 42 | capabilities: ServerCapabilities { 43 | text_document_sync: Some(TextDocumentSyncKind::FULL.into()), 44 | color_provider: Some(ColorProviderCapability::Simple(true)), 45 | completion_provider: Some(CompletionOptions { 46 | trigger_characters: Some(vec!["#".to_string()]), 47 | ..CompletionOptions::default() 48 | }), 49 | ..Default::default() 50 | }, 51 | ..Default::default() 52 | }) 53 | } 54 | 55 | /// Initialized notification. 56 | async fn initialized(&self, _: InitializedParams) { 57 | self.client 58 | .log_message(MessageType::INFO, "server initialized") 59 | .await; 60 | } 61 | 62 | /// Shutdown request handler. 63 | async fn shutdown(&self) -> Result<()> { 64 | Ok(()) 65 | } 66 | 67 | /// Inserts a newly opened file into the `documents` field. 68 | async fn did_open(&self, params: DidOpenTextDocumentParams) { 69 | let uri = params.text_document.uri; 70 | let text = params.text_document.text; 71 | 72 | self.documents.insert(uri, text); 73 | } 74 | 75 | /// Updates a file on its change. 76 | async fn did_change(&self, params: DidChangeTextDocumentParams) { 77 | let uri = params.text_document.uri; 78 | let docs = &self.documents; 79 | 80 | if let Some(mut text) = docs.get_mut(&uri) { 81 | text.clone_from(¶ms.content_changes[0].text); 82 | } 83 | } 84 | 85 | /// Named colors completions handler. 86 | async fn completion(&self, params: CompletionParams) -> Result> { 87 | let Self { 88 | color_completions, 89 | variable_completions, 90 | .. 91 | } = &self; 92 | 93 | let Position { 94 | line: line_pos, 95 | character: char_pos, 96 | } = params.text_document_position.position; 97 | 98 | let Some(context) = params.context else { 99 | return Ok(None); 100 | }; 101 | 102 | // early return on lines starting with `#` 103 | if char_pos <= 1 { 104 | return Ok(None); 105 | } 106 | 107 | let uri = params.text_document_position.text_document.uri; 108 | 109 | let Some(document) = &self.documents.get(&uri) else { 110 | return Ok(None); 111 | }; 112 | 113 | if let Some(completions) = color_completions { 114 | if Some("#".to_string()) == context.trigger_character { 115 | let indented_hash_regex = 116 | Regex::new(INDENTED_HASH_REGEX).expect("perfectly valid regex"); 117 | 118 | let line = document.lines().collect::>()[line_pos as usize]; 119 | 120 | if !indented_hash_regex 121 | .is_match(line) 122 | .expect("perfectly valid regex") 123 | { 124 | return Ok(Some(CompletionResponse::Array(completions.clone()))); 125 | } 126 | } 127 | } 128 | 129 | if *variable_completions && context.trigger_character.is_none() { 130 | let bindings = Regex::new(VARIABLE_REGEX).expect("perfectly valid regex"); 131 | 132 | let mut completions: Vec = vec![]; 133 | 134 | document.lines().for_each(|line| { 135 | if let Some(captures) = bindings.captures(line).unwrap() { 136 | let (variable_name, color_match) = ( 137 | captures.get(1).unwrap().as_str(), 138 | captures.get(3).unwrap().as_str(), 139 | ); 140 | 141 | completions.push(CompletionItem { 142 | kind: Some(CompletionItemKind::COLOR), 143 | documentation: Some(Documentation::String(format!("#{color_match}"))), 144 | sort_text: Some(variable_name.to_owned()), 145 | insert_text: Some(variable_name.to_owned()), 146 | label: variable_name.to_owned(), 147 | ..CompletionItem::default() 148 | }); 149 | } 150 | }); 151 | 152 | return Ok(Some(CompletionResponse::Array(completions))); 153 | } 154 | 155 | Ok(None) 156 | } 157 | 158 | /// Document color request handler. 159 | async fn document_color(&self, params: DocumentColorParams) -> Result> { 160 | // current file's URL 161 | let uri = params.text_document.uri; 162 | // all the opened files 163 | let docs = &self.documents; 164 | 165 | let colors: Vec = docs 166 | .get(&uri) 167 | .ok_or_else(|| Error::invalid_params("document not found"))? 168 | .lines() 169 | .enumerate() 170 | .flat_map(|(line_num, line)| { 171 | colors::colors_in_line_iter(&self.color_regex, line_num, line) 172 | }) 173 | .collect(); 174 | 175 | Ok(colors) 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /src/colors.rs: -------------------------------------------------------------------------------- 1 | //! Module with helper functions related to hex colors parsing. 2 | 3 | mod named_colors; 4 | 5 | pub use named_colors::NamedColors; 6 | use tower_lsp::lsp_types::Documentation; 7 | 8 | use crate::Color; 9 | use crate::ColorInformation; 10 | use crate::CompletionItem; 11 | use crate::CompletionItemKind; 12 | use crate::Position; 13 | use crate::Range; 14 | use crate::Regex; 15 | 16 | /// Named colors completions mode. 17 | pub enum CompletionsMode { 18 | /// both the uppercase hex strings and the lowercase ones. 19 | Full, 20 | 21 | /// no completions. 22 | None, 23 | 24 | /// only the uppercase hex colors after completion. 25 | Uppercase, 26 | 27 | /// only the lowercase hex colors after completion. 28 | Lowercase, 29 | } 30 | 31 | /// Completion builder function. 32 | /// 33 | /// Returns a [`Vec`] of [`CompletionItem`]s with [`NamedColors`] . 34 | pub fn named_colors_completions( 35 | mode: &CompletionsMode, 36 | colors: &NamedColors, 37 | ) -> Option> { 38 | if matches!(mode, CompletionsMode::None) { 39 | return None; 40 | } 41 | 42 | let colors = colors.get(); 43 | 44 | let completions: Vec = 45 | colors 46 | .iter() 47 | .fold(Vec::new(), |mut acc, (name, hex)| match mode { 48 | CompletionsMode::Full => { 49 | let lowercase_colors = ((*name).to_string(), (*hex).to_string()); 50 | 51 | acc.push(completion_item(lowercase_colors.0, lowercase_colors.1)); 52 | 53 | if hex.matches(char::is_alphabetic).count() > 0 { 54 | let uppercase_colors = (name.to_uppercase(), hex.to_uppercase()); 55 | 56 | acc.push(completion_item(uppercase_colors.0, uppercase_colors.1)); 57 | } 58 | 59 | acc 60 | } 61 | CompletionsMode::Uppercase => { 62 | let uppercase_colors = ((*name).to_string(), hex.to_uppercase()); 63 | 64 | acc.push(completion_item(uppercase_colors.0, uppercase_colors.1)); 65 | 66 | acc 67 | } 68 | CompletionsMode::Lowercase => { 69 | let lowercase_colors = ((*name).to_string(), (*hex).to_string()); 70 | 71 | acc.push(completion_item(lowercase_colors.0, lowercase_colors.1)); 72 | 73 | acc 74 | } 75 | CompletionsMode::None => acc, 76 | }); 77 | 78 | Some(completions) 79 | } 80 | 81 | /// [`CompletionItem`] helper function. 82 | /// 83 | /// Builds a [`CompletionItem`]. 84 | fn completion_item(color_name: String, color_hex: String) -> CompletionItem { 85 | CompletionItem { 86 | kind: Some(CompletionItemKind::COLOR), 87 | documentation: Some(Documentation::String(format!("#{color_hex}"))), 88 | sort_text: Some(color_name.to_lowercase()), 89 | insert_text: Some(color_hex), 90 | label: color_name, 91 | ..CompletionItem::default() 92 | } 93 | } 94 | 95 | /// Color searching helper function. 96 | /// 97 | /// Searches for color matches in a `line` using `regex`, returns a [`ColorInformation`]. 98 | #[allow(clippy::missing_panics_doc)] 99 | pub fn colors_in_line_iter( 100 | regex: &Regex, 101 | line_number: usize, 102 | line: &str, 103 | ) -> impl Iterator { 104 | regex 105 | .captures_iter(line) 106 | .filter(Result::is_ok) 107 | .map(move |captures| { 108 | let captures = captures.expect("perfectly valid regex"); 109 | // the first capture is a full matching string 110 | // the second capture holds quotation marks 111 | // the third one holds hex value 112 | let (full_hex, color_match) = (captures.get(0).unwrap(), captures.get(2).unwrap()); 113 | // hex color offsets in bytes 114 | let (start, end) = (full_hex.start(), full_hex.end()); 115 | 116 | // ColorInformation needs these offsets in characters, not in bytes 117 | let (color_start, color_end) = ( 118 | u32::try_from(line[..start].encode_utf16().count()).unwrap(), 119 | u32::try_from(line[..end].encode_utf16().count()).unwrap(), 120 | ); 121 | 122 | // current line number 123 | let line_number = u32::try_from(line_number).unwrap(); 124 | 125 | // parsing string slices of hex colors to the Color structure 126 | let color = parse_color(color_match.as_str()).unwrap(); 127 | 128 | // start tells the LSP client that the color starts *here* on *this* line 129 | // end tells the client that the color ends *here* on *this* line 130 | ColorInformation { 131 | color, 132 | range: Range { 133 | start: Position::new(line_number, color_start), 134 | end: Position::new(line_number, color_end), 135 | }, 136 | } 137 | }) 138 | } 139 | 140 | /// Color parsing function. 141 | /// 142 | /// It parses a string slice and returns a [`Color`]. 143 | /// 144 | /// # Exceptions 145 | /// 146 | /// Returns a [`None`] when the input string length is not in [3, 4, 6, 8]. 147 | /// 148 | /// # Panics 149 | /// 150 | /// This function panics when the input string has non hexadecimal characters. 151 | /// 152 | /// It will also panic if the string is bigger than 4 bytes. 153 | fn parse_color(hex_str: &str) -> Option { 154 | let str_length = hex_str.len(); 155 | let hex = u32::from_str_radix(hex_str, 16).unwrap(); 156 | 157 | match str_length { 158 | 3 | 4 => { 159 | let (r, g, b, a) = if str_length == 3 { 160 | ((hex & 0xF00) >> 8, (hex & 0x0F0) >> 4, hex & 0x00F, 0xF) 161 | } else { 162 | ( 163 | (hex & 0xF000) >> 12, 164 | (hex & 0x0F00) >> 8, 165 | (hex & 0x00F0) >> 4, 166 | (hex & 0x000F), 167 | ) 168 | }; 169 | 170 | #[expect( 171 | clippy::cast_possible_truncation, 172 | reason = "r, g, b values are always less than 0x10 which is less than u8::MAX" 173 | )] 174 | Some(Color { 175 | red: f32::from(r as u8) / 15f32, 176 | green: f32::from(g as u8) / 15f32, 177 | blue: f32::from(b as u8) / 15f32, 178 | alpha: f32::from(a as u8) / 15f32, 179 | }) 180 | } 181 | 6 | 8 => { 182 | let (r, g, b, a) = if str_length == 6 { 183 | let [_, r, g, b] = hex.to_be_bytes(); 184 | 185 | (r, g, b, 0xFF) 186 | } else { 187 | // [r, g, b, a] 188 | hex.to_be_bytes().into() 189 | }; 190 | 191 | Some(Color { 192 | red: f32::from(r) / 255f32, 193 | green: f32::from(g) / 255f32, 194 | blue: f32::from(b) / 255f32, 195 | alpha: f32::from(a) / 255f32, 196 | }) 197 | } 198 | _ => None, 199 | } 200 | } 201 | 202 | #[cfg(test)] 203 | mod parse_color { 204 | use super::*; 205 | 206 | #[test] 207 | fn success() { 208 | let cases = [ 209 | ("369", (0.2, 0.4, 0.6, 1.0)), 210 | ("369C", (0.2, 0.4, 0.6, 0.8)), 211 | ("336699", (0.2, 0.4, 0.6, 1.0)), 212 | ("336699CC", (0.2, 0.4, 0.6, 0.8)), 213 | ("1A4D80B3", (0.101960786, 0.3019608, 0.5019608, 0.7019608)), 214 | ("854D91B8", (0.52156866, 0.3019608, 0.5686275, 0.72156864)), 215 | ]; 216 | 217 | for (hex, color) in cases { 218 | assert_eq!(Some(to_color(color)), parse_color(hex)) 219 | } 220 | } 221 | 222 | #[test] 223 | fn fail_with_incorrect_length() { 224 | assert_eq!(None, parse_color("abcdefe")); 225 | } 226 | 227 | #[test] 228 | #[should_panic] 229 | fn panic_cant_parse_hex() { 230 | parse_color("arstgm"); 231 | } 232 | 233 | #[test] 234 | #[should_panic] 235 | fn panic_str_too_long() { 236 | parse_color("arstgmgtsra"); 237 | } 238 | 239 | fn to_color(colors: (f32, f32, f32, f32)) -> Color { 240 | let (red, green, blue, alpha) = colors; 241 | 242 | Color { 243 | red, 244 | green, 245 | blue, 246 | alpha, 247 | } 248 | } 249 | } 250 | 251 | #[cfg(test)] 252 | mod colors_in_line_iter { 253 | use super::*; 254 | 255 | const REGEX: &str = 256 | r#"(["'])\#([0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{4}|[0-9a-fA-F]{3})\1"#; 257 | 258 | #[test] 259 | fn success() { 260 | let text = "color1 = \"#9AB8DE\" # some comment\ncolor2 = '#369'\ncolor3 = \"#336699CC\"\ncolor4 = \"#693C\""; 261 | 262 | let colors = [ 263 | color_information((0, 9), (0, 18), (0.6039216, 0.72156864, 0.87058824, 1.0)), 264 | color_information((1, 9), (1, 15), (0.2, 0.4, 0.6, 1.0)), 265 | color_information((2, 9), (2, 20), (0.2, 0.4, 0.6, 0.8)), 266 | color_information((3, 9), (3, 16), (0.4, 0.6, 0.2, 0.8)), 267 | ]; 268 | 269 | assert_eq!(colors, &find_colors(text)[..]); 270 | } 271 | 272 | #[test] 273 | fn no_colors() { 274 | let text = "some random text talking about colors like #ABCDEF, #FFF,\n#E03C31,\n#007AA5\n#0A45\nalso wrong strings like \"#FF0000'"; 275 | 276 | let colors: [ColorInformation; 0] = []; 277 | 278 | assert_eq!(colors, &find_colors(text)[..]); 279 | } 280 | 281 | #[test] 282 | fn one_line_multiple_colors() { 283 | let text = "color1 = \"#9AB8DE\", '#369'"; 284 | 285 | let colors = [ 286 | color_information((0, 9), (0, 18), (0.6039216, 0.72156864, 0.87058824, 1.0)), 287 | color_information((0, 20), (0, 26), (0.2, 0.4, 0.6, 1.0)), 288 | ]; 289 | 290 | assert_eq!(colors, &find_colors(text)[..]); 291 | } 292 | 293 | fn color_information( 294 | start: (u32, u32), 295 | end: (u32, u32), 296 | (red, green, blue, alpha): (f32, f32, f32, f32), 297 | ) -> ColorInformation { 298 | ColorInformation { 299 | range: Range { 300 | start: Position { 301 | line: start.0, 302 | character: start.1, 303 | }, 304 | end: Position { 305 | line: end.0, 306 | character: end.1, 307 | }, 308 | }, 309 | color: Color { 310 | red, 311 | green, 312 | blue, 313 | alpha, 314 | }, 315 | } 316 | } 317 | 318 | fn find_colors(text: &str) -> Vec { 319 | let regex = Regex::new(REGEX).unwrap(); 320 | 321 | text.lines() 322 | .enumerate() 323 | .flat_map(|(line_num, line)| colors_in_line_iter(®ex, line_num, &line)) 324 | .collect() 325 | } 326 | } 327 | 328 | #[cfg(test)] 329 | mod color_completions { 330 | use super::*; 331 | 332 | #[test] 333 | fn named_color_completions_noop() { 334 | assert_eq!( 335 | None, 336 | named_colors_completions(&CompletionsMode::None, &NamedColors::ColorHexa) 337 | ); 338 | } 339 | 340 | #[test] 341 | fn named_color_completions_uppercase() { 342 | if let Some(completion_items_vec) = 343 | named_colors_completions(&CompletionsMode::Uppercase, &NamedColors::ColorHexa) 344 | { 345 | assert_eq!(false, completion_items_vec.is_empty()); 346 | } 347 | } 348 | 349 | #[test] 350 | fn named_color_completions_lowercase() { 351 | if let Some(completion_items_vec) = 352 | named_colors_completions(&CompletionsMode::Lowercase, &NamedColors::ColorHexa) 353 | { 354 | assert_eq!(false, completion_items_vec.is_empty()); 355 | } 356 | } 357 | 358 | #[test] 359 | fn named_color_completions_full() { 360 | if let Some(completion_items_vec) = 361 | named_colors_completions(&CompletionsMode::Full, &NamedColors::ColorHexa) 362 | { 363 | assert_eq!(false, completion_items_vec.is_empty()); 364 | } 365 | 366 | if let Some(completion_items_vec) = 367 | named_colors_completions(&CompletionsMode::Full, &NamedColors::Css) 368 | { 369 | assert_eq!(false, completion_items_vec.is_empty()); 370 | } 371 | } 372 | } 373 | -------------------------------------------------------------------------------- /src/colors/named_colors.rs: -------------------------------------------------------------------------------- 1 | //! Named colors for completions building. 2 | 3 | type ColorCollection = &'static [(&'static str, &'static str)]; 4 | 5 | // css named colors 6 | const CSS: ColorCollection = &[ 7 | ("aliceblue", "f0f8ff"), 8 | ("antiquewhite", "faebd7"), 9 | ("aqua", "00ffff"), 10 | ("aquamarine", "7fffd4"), 11 | ("azure", "f0ffff"), 12 | ("beige", "f5f5dc"), 13 | ("bisque", "ffe4c4"), 14 | ("black", "000000"), 15 | ("blanchedalmond", "ffebcd"), 16 | ("blue", "0000ff"), 17 | ("blueviolet", "8a2be2"), 18 | ("brown", "a52a2a"), 19 | ("burlywood", "deb887"), 20 | ("cadetblue", "5f9ea0"), 21 | ("chartreuse", "7fff00"), 22 | ("chocolate", "d2691e"), 23 | ("coral", "ff7f50"), 24 | ("cornflowerblue", "6495ed"), 25 | ("cornsilk", "fff8dc"), 26 | ("crimson", "dc143c"), 27 | ("cyan", "00ffff"), 28 | ("darkblue", "00008b"), 29 | ("darkcyan", "008b8b"), 30 | ("darkgoldenrod", "b8860b"), 31 | ("darkgray", "a9a9a9"), 32 | ("darkgreen", "006400"), 33 | ("darkgrey", "a9a9a9"), 34 | ("darkkhaki", "bdb76b"), 35 | ("darkmagenta", "8b008b"), 36 | ("darkolivegreen", "556b2f"), 37 | ("darkorange", "ff8c00"), 38 | ("darkorchid", "9932cc"), 39 | ("darkred", "8b0000"), 40 | ("darksalmon", "e9967a"), 41 | ("darkseagreen", "8fbc8f"), 42 | ("darkslateblue", "483d8b"), 43 | ("darkslategray", "2f4f4f"), 44 | ("darkslategrey", "2f4f4f"), 45 | ("darkturquoise", "00ced1"), 46 | ("darkviolet", "9400d3"), 47 | ("deeppink", "ff1493"), 48 | ("deepskyblue", "00bfff"), 49 | ("dimgray", "696969"), 50 | ("dimgrey", "696969"), 51 | ("dodgerblue", "1e90ff"), 52 | ("firebrick", "b22222"), 53 | ("floralwhite", "fffaf0"), 54 | ("forestgreen", "228b22"), 55 | ("fuchsia", "ff00ff"), 56 | ("gainsboro", "dcdcdc"), 57 | ("ghostwhite", "f8f8ff"), 58 | ("gold", "ffd700"), 59 | ("goldenrod", "daa520"), 60 | ("gray", "808080"), 61 | ("green", "008000"), 62 | ("greenyellow", "adff2f"), 63 | ("grey", "808080"), 64 | ("honeydew", "f0fff0"), 65 | ("hotpink", "ff69b4"), 66 | ("indianred", "cd5c5c"), 67 | ("indigo", "4b0082"), 68 | ("ivory", "fffff0"), 69 | ("khaki", "f0e68c"), 70 | ("lavender", "e6e6fa"), 71 | ("lavenderblush", "fff0f5"), 72 | ("lawngreen", "7cfc00"), 73 | ("lemonchiffon", "fffacd"), 74 | ("lightblue", "add8e6"), 75 | ("lightcoral", "f08080"), 76 | ("lightcyan", "e0ffff"), 77 | ("lightgoldenrodyellow", "fafad2"), 78 | ("lightgray", "d3d3d3"), 79 | ("lightgreen", "90ee90"), 80 | ("lightgrey", "d3d3d3"), 81 | ("lightpink", "ffb6c1"), 82 | ("lightsalmon", "ffa07a"), 83 | ("lightseagreen", "20b2aa"), 84 | ("lightskyblue", "87cefa"), 85 | ("lightslategray", "778899"), 86 | ("lightslategrey", "778899"), 87 | ("lightsteelblue", "b0c4de"), 88 | ("lightyellow", "ffffe0"), 89 | ("lime", "00ff00"), 90 | ("limegreen", "32cd32"), 91 | ("linen", "faf0e6"), 92 | ("magenta", "ff00ff"), 93 | ("maroon", "800000"), 94 | ("mediumaquamarine", "66cdaa"), 95 | ("mediumblue", "0000cd"), 96 | ("mediumorchid", "ba55d3"), 97 | ("mediumpurple", "9370db"), 98 | ("mediumseagreen", "3cb371"), 99 | ("mediumslateblue", "7b68ee"), 100 | ("mediumspringgreen", "00fa9a"), 101 | ("mediumturquoise", "48d1cc"), 102 | ("mediumvioletred", "c71585"), 103 | ("midnightblue", "191970"), 104 | ("mintcream", "f5fffa"), 105 | ("mistyrose", "ffe4e1"), 106 | ("moccasin", "ffe4b5"), 107 | ("navajowhite", "ffdead"), 108 | ("navy", "000080"), 109 | ("oldlace", "fdf5e6"), 110 | ("olive", "808000"), 111 | ("olivedrab", "6b8e23"), 112 | ("orange", "ffa500"), 113 | ("orangered", "ff4500"), 114 | ("orchid", "da70d6"), 115 | ("palegoldenrod", "eee8aa"), 116 | ("palegreen", "98fb98"), 117 | ("paleturquoise", "afeeee"), 118 | ("palevioletred", "db7093"), 119 | ("papayawhip", "ffefd5"), 120 | ("peachpuff", "ffdab9"), 121 | ("peru", "cd853f"), 122 | ("pink", "ffc0cb"), 123 | ("plum", "dda0dd"), 124 | ("powderblue", "b0e0e6"), 125 | ("purple", "800080"), 126 | ("rebeccapurple", "663399"), 127 | ("red", "ff0000"), 128 | ("rosybrown", "bc8f8f"), 129 | ("royalblue", "4169e1"), 130 | ("saddlebrown", "8b4513"), 131 | ("salmon", "fa8072"), 132 | ("sandybrown", "f4a460"), 133 | ("seagreen", "2e8b57"), 134 | ("seashell", "fff5ee"), 135 | ("sienna", "a0522d"), 136 | ("silver", "c0c0c0"), 137 | ("skyblue", "87ceeb"), 138 | ("slateblue", "6a5acd"), 139 | ("slategray", "708090"), 140 | ("slategrey", "708090"), 141 | ("snow", "fffafa"), 142 | ("springgreen", "00ff7f"), 143 | ("steelblue", "4682b4"), 144 | ("tan", "d2b48c"), 145 | ("teal", "008080"), 146 | ("thistle", "d8bfd8"), 147 | ("tomato", "ff6347"), 148 | ("transparent", "00000000"), 149 | ("turquoise", "40e0d0"), 150 | ("violet", "ee82ee"), 151 | ("wheat", "f5deb3"), 152 | ("white", "ffffff"), 153 | ("whitesmoke", "f5f5f5"), 154 | ("yellow", "ffff00"), 155 | ("yellowgreen", "9acd32"), 156 | ]; 157 | 158 | // colorhexa colors by name 159 | const COLOR_HEXA: ColorCollection = &[ 160 | ("air-force-blue", "5d8aa8"), 161 | ("alice-blue", "f0f8ff"), 162 | ("alizarin-crimson", "e32636"), 163 | ("almond", "efdecd"), 164 | ("amaranth", "e52b50"), 165 | ("amber", "ffbf00"), 166 | ("american-rose", "ff033e"), 167 | ("amethyst", "9966cc"), 168 | ("android-green", "a4c639"), 169 | ("anti-flash-white", "f2f3f4"), 170 | ("antique-brass", "cd9575"), 171 | ("antique-fuchsia", "915c83"), 172 | ("antique-white", "faebd7"), 173 | ("ao", "008000"), 174 | ("apple-green", "8db600"), 175 | ("apricot", "fbceb1"), 176 | ("aqua", "00ffff"), 177 | ("aquamarine", "7fffd4"), 178 | ("army-green", "4b5320"), 179 | ("arylide-yellow", "e9d66b"), 180 | ("ash-grey", "b2beb5"), 181 | ("asparagus", "87a96b"), 182 | ("atomic-tangerine", "ff9966"), 183 | ("auburn", "a52a2a"), 184 | ("aureolin", "fdee00"), 185 | ("aurometalsaurus", "6e7f80"), 186 | ("awesome", "ff2052"), 187 | ("azure", "007fff"), 188 | ("azure-mist/web", "f0ffff"), 189 | ("baby-blue", "89cff0"), 190 | ("baby-blue-eyes", "a1caf1"), 191 | ("baby-pink", "f4c2c2"), 192 | ("ball-blue", "21abcd"), 193 | ("banana-mania", "fae7b5"), 194 | ("banana-yellow", "ffe135"), 195 | ("battleship-grey", "848482"), 196 | ("bazaar", "98777b"), 197 | ("beau-blue", "bcd4e6"), 198 | ("beaver", "9f8170"), 199 | ("beige", "f5f5dc"), 200 | ("bisque", "ffe4c4"), 201 | ("bistre", "3d2b1f"), 202 | ("bittersweet", "fe6f5e"), 203 | ("black", "000000"), 204 | ("blanched-almond", "ffebcd"), 205 | ("bleu-de-france", "318ce7"), 206 | ("blizzard-blue", "ace5ee"), 207 | ("blond", "faf0be"), 208 | ("blue", "0000ff"), 209 | ("blue-bell", "a2a2d0"), 210 | ("blue-gray", "6699cc"), 211 | ("blue-green", "0d98ba"), 212 | ("blue-purple", "8a2be2"), 213 | ("blue-violet", "8a2be2"), 214 | ("blush", "de5d83"), 215 | ("bole", "79443b"), 216 | ("bondi-blue", "0095b6"), 217 | ("bone", "e3dac9"), 218 | ("boston-university-red", "cc0000"), 219 | ("bottle-green", "006a4e"), 220 | ("boysenberry", "873260"), 221 | ("brandeis-blue", "0070ff"), 222 | ("brass", "b5a642"), 223 | ("brick-red", "cb4154"), 224 | ("bright-cerulean", "1dacd6"), 225 | ("bright-green", "66ff00"), 226 | ("bright-lavender", "bf94e4"), 227 | ("bright-maroon", "c32148"), 228 | ("bright-pink", "ff007f"), 229 | ("bright-turquoise", "08e8de"), 230 | ("bright-ube", "d19fe8"), 231 | ("brilliant-lavender", "f4bbff"), 232 | ("brilliant-rose", "ff55a3"), 233 | ("brink-pink", "fb607f"), 234 | ("british-racing-green", "004225"), 235 | ("bronze", "cd7f32"), 236 | ("brown", "a52a2a"), 237 | ("bubble-gum", "ffc1cc"), 238 | ("bubbles", "e7feff"), 239 | ("buff", "f0dc82"), 240 | ("bulgarian-rose", "480607"), 241 | ("burgundy", "800020"), 242 | ("burlywood", "deb887"), 243 | ("burnt-orange", "cc5500"), 244 | ("burnt-sienna", "e97451"), 245 | ("burnt-umber", "8a3324"), 246 | ("byzantine", "bd33a4"), 247 | ("byzantium", "702963"), 248 | ("cg-blue", "007aa5"), 249 | ("cg-red", "e03c31"), 250 | ("cadet", "536872"), 251 | ("cadet-blue", "5f9ea0"), 252 | ("cadet-grey", "91a3b0"), 253 | ("cadmium-green", "006b3c"), 254 | ("cadmium-orange", "ed872d"), 255 | ("cadmium-red", "e30022"), 256 | ("cadmium-yellow", "fff600"), 257 | ("cafe-au-lait", "a67b5b"), 258 | ("cafe-noir", "4b3621"), 259 | ("cal-poly-pomona-green", "1e4d2b"), 260 | ("cambridge-blue", "a3c1ad"), 261 | ("camel", "c19a6b"), 262 | ("camouflage-green", "78866b"), 263 | ("canary", "ffff99"), 264 | ("canary-yellow", "ffef00"), 265 | ("candy-apple-red", "ff0800"), 266 | ("candy-pink", "e4717a"), 267 | ("capri", "00bfff"), 268 | ("caput-mortuum", "592720"), 269 | ("cardinal", "c41e3a"), 270 | ("caribbean-green", "00cc99"), 271 | ("carmine", "ff0040"), 272 | ("carmine-pink", "eb4c42"), 273 | ("carmine-red", "ff0038"), 274 | ("carnation-pink", "ffa6c9"), 275 | ("carnelian", "b31b1b"), 276 | ("carolina-blue", "99badd"), 277 | ("carrot-orange", "ed9121"), 278 | ("celadon", "ace1af"), 279 | ("celeste", "b2ffff"), 280 | ("celestial-blue", "4997d0"), 281 | ("cerise", "de3163"), 282 | ("cerise-pink", "ec3b83"), 283 | ("cerulean", "007ba7"), 284 | ("cerulean-blue", "2a52be"), 285 | ("chamoisee", "a0785a"), 286 | ("champagne", "fad6a5"), 287 | ("charcoal", "36454f"), 288 | ("chartreuse", "7fff00"), 289 | ("cherry", "de3163"), 290 | ("cherry-blossom-pink", "ffb7c5"), 291 | ("chestnut", "cd5c5c"), 292 | ("chocolate", "d2691e"), 293 | ("chrome-yellow", "ffa700"), 294 | ("cinereous", "98817b"), 295 | ("cinnabar", "e34234"), 296 | ("cinnamon", "d2691e"), 297 | ("citrine", "e4d00a"), 298 | ("classic-rose", "fbcce7"), 299 | ("cobalt", "0047ab"), 300 | ("cocoa-brown", "d2691e"), 301 | ("coffee", "6f4e37"), 302 | ("columbia-blue", "9bddff"), 303 | ("cool-black", "002e63"), 304 | ("cool-grey", "8c92ac"), 305 | ("copper", "b87333"), 306 | ("copper-rose", "996666"), 307 | ("coquelicot", "ff3800"), 308 | ("coral", "ff7f50"), 309 | ("coral-pink", "f88379"), 310 | ("coral-red", "ff4040"), 311 | ("cordovan", "893f45"), 312 | ("corn", "fbec5d"), 313 | ("cornell-red", "b31b1b"), 314 | ("cornflower", "9aceeb"), 315 | ("cornflower-blue", "6495ed"), 316 | ("cornsilk", "fff8dc"), 317 | ("cosmic-latte", "fff8e7"), 318 | ("cotton-candy", "ffbcd9"), 319 | ("cream", "fffdd0"), 320 | ("crimson", "dc143c"), 321 | ("crimson-red", "990000"), 322 | ("crimson-glory", "be0032"), 323 | ("cyan", "00ffff"), 324 | ("daffodil", "ffff31"), 325 | ("dandelion", "f0e130"), 326 | ("dark-blue", "00008b"), 327 | ("dark-brown", "654321"), 328 | ("dark-byzantium", "5d3954"), 329 | ("dark-candy-apple-red", "a40000"), 330 | ("dark-cerulean", "08457e"), 331 | ("dark-chestnut", "986960"), 332 | ("dark-coral", "cd5b45"), 333 | ("dark-cyan", "008b8b"), 334 | ("dark-electric-blue", "536878"), 335 | ("dark-goldenrod", "b8860b"), 336 | ("dark-gray", "a9a9a9"), 337 | ("dark-green", "013220"), 338 | ("dark-jungle-green", "1a2421"), 339 | ("dark-khaki", "bdb76b"), 340 | ("dark-lava", "483c32"), 341 | ("dark-lavender", "734f96"), 342 | ("dark-magenta", "8b008b"), 343 | ("dark-midnight-blue", "003366"), 344 | ("dark-olive-green", "556b2f"), 345 | ("dark-orange", "ff8c00"), 346 | ("dark-orchid", "9932cc"), 347 | ("dark-pastel-blue", "779ecb"), 348 | ("dark-pastel-green", "03c03c"), 349 | ("dark-pastel-purple", "966fd6"), 350 | ("dark-pastel-red", "c23b22"), 351 | ("dark-pink", "e75480"), 352 | ("dark-powder-blue", "003399"), 353 | ("dark-raspberry", "872657"), 354 | ("dark-red", "8b0000"), 355 | ("dark-salmon", "e9967a"), 356 | ("dark-scarlet", "560319"), 357 | ("dark-sea-green", "8fbc8f"), 358 | ("dark-sienna", "3c1414"), 359 | ("dark-slate-blue", "483d8b"), 360 | ("dark-slate-gray", "2f4f4f"), 361 | ("dark-spring-green", "177245"), 362 | ("dark-tan", "918151"), 363 | ("dark-tangerine", "ffa812"), 364 | ("dark-taupe", "483c32"), 365 | ("dark-terra-cotta", "cc4e5c"), 366 | ("dark-turquoise", "00ced1"), 367 | ("dark-violet", "9400d3"), 368 | ("dartmouth-green", "00693e"), 369 | ("davy-grey", "555555"), 370 | ("debian-red", "d70a53"), 371 | ("deep-carmine", "a9203e"), 372 | ("deep-carmine-pink", "ef3038"), 373 | ("deep-carrot-orange", "e9692c"), 374 | ("deep-cerise", "da3287"), 375 | ("deep-champagne", "fad6a5"), 376 | ("deep-chestnut", "b94e48"), 377 | ("deep-coffee", "704241"), 378 | ("deep-fuchsia", "c154c1"), 379 | ("deep-jungle-green", "004b49"), 380 | ("deep-lilac", "9955bb"), 381 | ("deep-magenta", "cc00cc"), 382 | ("deep-peach", "ffcba4"), 383 | ("deep-pink", "ff1493"), 384 | ("deep-saffron", "ff9933"), 385 | ("deep-sky-blue", "00bfff"), 386 | ("denim", "1560bd"), 387 | ("desert", "c19a6b"), 388 | ("desert-sand", "edc9af"), 389 | ("dim-gray", "696969"), 390 | ("dodger-blue", "1e90ff"), 391 | ("dogwood-rose", "d71868"), 392 | ("dollar-bill", "85bb65"), 393 | ("drab", "967117"), 394 | ("duke-blue", "00009c"), 395 | ("earth-yellow", "e1a95f"), 396 | ("ecru", "c2b280"), 397 | ("eggplant", "614051"), 398 | ("eggshell", "f0ead6"), 399 | ("egyptian-blue", "1034a6"), 400 | ("electric-blue", "7df9ff"), 401 | ("electric-crimson", "ff003f"), 402 | ("electric-cyan", "00ffff"), 403 | ("electric-green", "00ff00"), 404 | ("electric-indigo", "6f00ff"), 405 | ("electric-lavender", "f4bbff"), 406 | ("electric-lime", "ccff00"), 407 | ("electric-purple", "bf00ff"), 408 | ("electric-ultramarine", "3f00ff"), 409 | ("electric-violet", "8f00ff"), 410 | ("electric-yellow", "ffff00"), 411 | ("emerald", "50c878"), 412 | ("eton-blue", "96c8a2"), 413 | ("fallow", "c19a6b"), 414 | ("falu-red", "801818"), 415 | ("famous", "ff00ff"), 416 | ("fandango", "b53389"), 417 | ("fashion-fuchsia", "f400a1"), 418 | ("fawn", "e5aa70"), 419 | ("feldgrau", "4d5d53"), 420 | ("fern", "71bc78"), 421 | ("fern-green", "4f7942"), 422 | ("ferrari-red", "ff2800"), 423 | ("field-drab", "6c541e"), 424 | ("fire-engine-red", "ce2029"), 425 | ("firebrick", "b22222"), 426 | ("flame", "e25822"), 427 | ("flamingo-pink", "fc8eac"), 428 | ("flavescent", "f7e98e"), 429 | ("flax", "eedc82"), 430 | ("floral-white", "fffaf0"), 431 | ("fluorescent-orange", "ffbf00"), 432 | ("fluorescent-pink", "ff1493"), 433 | ("fluorescent-yellow", "ccff00"), 434 | ("folly", "ff004f"), 435 | ("forest-green", "228b22"), 436 | ("french-beige", "a67b5b"), 437 | ("french-blue", "0072bb"), 438 | ("french-lilac", "86608e"), 439 | ("french-rose", "f64a8a"), 440 | ("fuchsia", "ff00ff"), 441 | ("fuchsia-pink", "ff77ff"), 442 | ("fulvous", "e48400"), 443 | ("fuzzy-wuzzy", "cc6666"), 444 | ("gainsboro", "dcdcdc"), 445 | ("gamboge", "e49b0f"), 446 | ("ghost-white", "f8f8ff"), 447 | ("ginger", "b06500"), 448 | ("glaucous", "6082b6"), 449 | ("glitter", "e6e8fa"), 450 | ("gold", "ffd700"), 451 | ("golden-brown", "996515"), 452 | ("golden-poppy", "fcc200"), 453 | ("golden-yellow", "ffdf00"), 454 | ("goldenrod", "daa520"), 455 | ("granny-smith-apple", "a8e4a0"), 456 | ("gray", "808080"), 457 | ("gray-asparagus", "465945"), 458 | ("green", "00ff00"), 459 | ("green-blue", "1164b4"), 460 | ("green-yellow", "adff2f"), 461 | ("grullo", "a99a86"), 462 | ("guppie-green", "00ff7f"), 463 | ("halaya-ube", "663854"), 464 | ("han-blue", "446ccf"), 465 | ("han-purple", "5218fa"), 466 | ("hansa-yellow", "e9d66b"), 467 | ("harlequin", "3fff00"), 468 | ("harvard-crimson", "c90016"), 469 | ("harvest-gold", "da9100"), 470 | ("heart-gold", "808000"), 471 | ("heliotrope", "df73ff"), 472 | ("hollywood-cerise", "f400a1"), 473 | ("honeydew", "f0fff0"), 474 | ("hooker-green", "49796b"), 475 | ("hot-magenta", "ff1dce"), 476 | ("hot-pink", "ff69b4"), 477 | ("hunter-green", "355e3b"), 478 | ("icterine", "fcf75e"), 479 | ("inchworm", "b2ec5d"), 480 | ("india-green", "138808"), 481 | ("indian-red", "cd5c5c"), 482 | ("indian-yellow", "e3a857"), 483 | ("indigo", "4b0082"), 484 | ("international-klein-blue", "002fa7"), 485 | ("international-orange", "ff4f00"), 486 | ("iris", "5a4fcf"), 487 | ("isabelline", "f4f0ec"), 488 | ("islamic-green", "009000"), 489 | ("ivory", "fffff0"), 490 | ("jade", "00a86b"), 491 | ("jasmine", "f8de7e"), 492 | ("jasper", "d73b3e"), 493 | ("jazzberry-jam", "a50b5e"), 494 | ("jonquil", "fada5e"), 495 | ("june-bud", "bdda57"), 496 | ("jungle-green", "29ab87"), 497 | ("ku-crimson", "e8000d"), 498 | ("kelly-green", "4cbb17"), 499 | ("khaki", "c3b091"), 500 | ("la-salle-green", "087830"), 501 | ("languid-lavender", "d6cadd"), 502 | ("lapis-lazuli", "26619c"), 503 | ("laser-lemon", "fefe22"), 504 | ("laurel-green", "a9ba9d"), 505 | ("lava", "cf1020"), 506 | ("lavender", "e6e6fa"), 507 | ("lavender-blue", "ccccff"), 508 | ("lavender-blush", "fff0f5"), 509 | ("lavender-gray", "c4c3d0"), 510 | ("lavender-indigo", "9457eb"), 511 | ("lavender-magenta", "ee82ee"), 512 | ("lavender-mist", "e6e6fa"), 513 | ("lavender-pink", "fbaed2"), 514 | ("lavender-purple", "967bb6"), 515 | ("lavender-rose", "fba0e3"), 516 | ("lawn-green", "7cfc00"), 517 | ("lemon", "fff700"), 518 | ("lemon-yellow", "fff44f"), 519 | ("lemon-chiffon", "fffacd"), 520 | ("lemon-lime", "bfff00"), 521 | ("light-crimson", "f56991"), 522 | ("light-thulian-pink", "e68fac"), 523 | ("light-apricot", "fdd5b1"), 524 | ("light-blue", "add8e6"), 525 | ("light-brown", "b5651d"), 526 | ("light-carmine-pink", "e66771"), 527 | ("light-coral", "f08080"), 528 | ("light-cornflower-blue", "93ccea"), 529 | ("light-cyan", "e0ffff"), 530 | ("light-fuchsia-pink", "f984ef"), 531 | ("light-goldenrod-yellow", "fafad2"), 532 | ("light-gray", "d3d3d3"), 533 | ("light-green", "90ee90"), 534 | ("light-khaki", "f0e68c"), 535 | ("light-pastel-purple", "b19cd9"), 536 | ("light-pink", "ffb6c1"), 537 | ("light-salmon", "ffa07a"), 538 | ("light-salmon-pink", "ff9999"), 539 | ("light-sea-green", "20b2aa"), 540 | ("light-sky-blue", "87cefa"), 541 | ("light-slate-gray", "778899"), 542 | ("light-taupe", "b38b6d"), 543 | ("light-yellow", "ffffed"), 544 | ("lilac", "c8a2c8"), 545 | ("lime", "bfff00"), 546 | ("lime-green", "32cd32"), 547 | ("lincoln-green", "195905"), 548 | ("linen", "faf0e6"), 549 | ("lion", "c19a6b"), 550 | ("liver", "534b4f"), 551 | ("lust", "e62020"), 552 | ("msu-green", "18453b"), 553 | ("macaroni-and-cheese", "ffbd88"), 554 | ("magenta", "ff00ff"), 555 | ("magic-mint", "aaf0d1"), 556 | ("magnolia", "f8f4ff"), 557 | ("mahogany", "c04000"), 558 | ("maize", "fbec5d"), 559 | ("majorelle-blue", "6050dc"), 560 | ("malachite", "0bda51"), 561 | ("manatee", "979aaa"), 562 | ("mango-tango", "ff8243"), 563 | ("mantis", "74c365"), 564 | ("maroon", "800000"), 565 | ("mauve", "e0b0ff"), 566 | ("mauve-taupe", "915f6d"), 567 | ("mauvelous", "ef98aa"), 568 | ("maya-blue", "73c2fb"), 569 | ("meat-brown", "e5b73b"), 570 | ("medium-persian-blue", "0067a5"), 571 | ("medium-aquamarine", "66ddaa"), 572 | ("medium-blue", "0000cd"), 573 | ("medium-candy-apple-red", "e2062c"), 574 | ("medium-carmine", "af4035"), 575 | ("medium-champagne", "f3e5ab"), 576 | ("medium-electric-blue", "035096"), 577 | ("medium-jungle-green", "1c352d"), 578 | ("medium-lavender-magenta", "dda0dd"), 579 | ("medium-orchid", "ba55d3"), 580 | ("medium-purple", "9370db"), 581 | ("medium-red-violet", "bb3385"), 582 | ("medium-sea-green", "3cb371"), 583 | ("medium-slate-blue", "7b68ee"), 584 | ("medium-spring-bud", "c9dc87"), 585 | ("medium-spring-green", "00fa9a"), 586 | ("medium-taupe", "674c47"), 587 | ("medium-teal-blue", "0054b4"), 588 | ("medium-turquoise", "48d1cc"), 589 | ("medium-violet-red", "c71585"), 590 | ("melon", "fdbcb4"), 591 | ("midnight-blue", "191970"), 592 | ("midnight-green", "004953"), 593 | ("mikado-yellow", "ffc40c"), 594 | ("mint", "3eb489"), 595 | ("mint-cream", "f5fffa"), 596 | ("mint-green", "98ff98"), 597 | ("misty-rose", "ffe4e1"), 598 | ("moccasin", "faebd7"), 599 | ("mode-beige", "967117"), 600 | ("moonstone-blue", "73a9c2"), 601 | ("mordant-red-19", "ae0c00"), 602 | ("moss-green", "addfad"), 603 | ("mountain-meadow", "30ba8f"), 604 | ("mountbatten-pink", "997a8d"), 605 | ("mulberry", "c54b8c"), 606 | ("munsell", "f2f3f4"), 607 | ("mustard", "ffdb58"), 608 | ("myrtle", "21421e"), 609 | ("nadeshiko-pink", "f6adc6"), 610 | ("napier-green", "2a8000"), 611 | ("naples-yellow", "fada5e"), 612 | ("navajo-white", "ffdead"), 613 | ("navy-blue", "000080"), 614 | ("neon-carrot", "ffa343"), 615 | ("neon-fuchsia", "fe59c2"), 616 | ("neon-green", "39ff14"), 617 | ("non-photo-blue", "a4dded"), 618 | ("north-texas-green", "059033"), 619 | ("ocean-boat-blue", "0077be"), 620 | ("ochre", "cc7722"), 621 | ("office-green", "008000"), 622 | ("old-gold", "cfb53b"), 623 | ("old-lace", "fdf5e6"), 624 | ("old-lavender", "796878"), 625 | ("old-mauve", "673147"), 626 | ("old-rose", "c08081"), 627 | ("olive", "808000"), 628 | ("olive-drab", "6b8e23"), 629 | ("olive-green", "bab86c"), 630 | ("olivine", "9ab973"), 631 | ("onyx", "0f0f0f"), 632 | ("opera-mauve", "b784a7"), 633 | ("orange", "ffa500"), 634 | ("orange-yellow", "f8d568"), 635 | ("orange-peel", "ff9f00"), 636 | ("orange-red", "ff4500"), 637 | ("orchid", "da70d6"), 638 | ("otter-brown", "654321"), 639 | ("outer-space", "414a4c"), 640 | ("outrageous-orange", "ff6e4a"), 641 | ("oxford-blue", "002147"), 642 | ("pacific-blue", "1ca9c9"), 643 | ("pakistan-green", "006600"), 644 | ("palatinate-blue", "273be2"), 645 | ("palatinate-purple", "682860"), 646 | ("pale-aqua", "bcd4e6"), 647 | ("pale-blue", "afeeee"), 648 | ("pale-brown", "987654"), 649 | ("pale-carmine", "af4035"), 650 | ("pale-cerulean", "9bc4e2"), 651 | ("pale-chestnut", "ddadaf"), 652 | ("pale-copper", "da8a67"), 653 | ("pale-cornflower-blue", "abcdef"), 654 | ("pale-gold", "e6be8a"), 655 | ("pale-goldenrod", "eee8aa"), 656 | ("pale-green", "98fb98"), 657 | ("pale-lavender", "dcd0ff"), 658 | ("pale-magenta", "f984e5"), 659 | ("pale-pink", "fadadd"), 660 | ("pale-plum", "dda0dd"), 661 | ("pale-red-violet", "db7093"), 662 | ("pale-robin-egg-blue", "96ded1"), 663 | ("pale-silver", "c9c0bb"), 664 | ("pale-spring-bud", "ecebbd"), 665 | ("pale-taupe", "bc987e"), 666 | ("pale-violet-red", "db7093"), 667 | ("pansy-purple", "78184a"), 668 | ("papaya-whip", "ffefd5"), 669 | ("paris-green", "50c878"), 670 | ("pastel-blue", "aec6cf"), 671 | ("pastel-brown", "836953"), 672 | ("pastel-gray", "cfcfc4"), 673 | ("pastel-green", "77dd77"), 674 | ("pastel-magenta", "f49ac2"), 675 | ("pastel-orange", "ffb347"), 676 | ("pastel-pink", "ffd1dc"), 677 | ("pastel-purple", "b39eb5"), 678 | ("pastel-red", "ff6961"), 679 | ("pastel-violet", "cb99c9"), 680 | ("pastel-yellow", "fdfd96"), 681 | ("patriarch", "800080"), 682 | ("payne-grey", "536878"), 683 | ("peach", "ffe5b4"), 684 | ("peach-puff", "ffdab9"), 685 | ("peach-yellow", "fadfad"), 686 | ("pear", "d1e231"), 687 | ("pearl", "eae0c8"), 688 | ("pearl-aqua", "88d8c0"), 689 | ("peridot", "e6e200"), 690 | ("periwinkle", "ccccff"), 691 | ("persian-blue", "1c39bb"), 692 | ("persian-indigo", "32127a"), 693 | ("persian-orange", "d99058"), 694 | ("persian-pink", "f77fbe"), 695 | ("persian-plum", "701c1c"), 696 | ("persian-red", "cc3333"), 697 | ("persian-rose", "fe28a2"), 698 | ("phlox", "df00ff"), 699 | ("phthalo-blue", "000f89"), 700 | ("phthalo-green", "123524"), 701 | ("piggy-pink", "fddde6"), 702 | ("pine-green", "01796f"), 703 | ("pink", "ffc0cb"), 704 | ("pink-flamingo", "fc74fd"), 705 | ("pink-sherbet", "f78fa7"), 706 | ("pink-pearl", "e7accf"), 707 | ("pistachio", "93c572"), 708 | ("platinum", "e5e4e2"), 709 | ("plum", "dda0dd"), 710 | ("portland-orange", "ff5a36"), 711 | ("powder-blue", "b0e0e6"), 712 | ("princeton-orange", "ff8f00"), 713 | ("prussian-blue", "003153"), 714 | ("psychedelic-purple", "df00ff"), 715 | ("puce", "cc8899"), 716 | ("pumpkin", "ff7518"), 717 | ("purple", "800080"), 718 | ("purple-heart", "69359c"), 719 | ("purple-mountains-majesty", "9d81ba"), 720 | ("purple-mountain-majesty", "9678b6"), 721 | ("purple-pizzazz", "fe4eda"), 722 | ("purple-taupe", "50404d"), 723 | ("rackley", "5d8aa8"), 724 | ("radical-red", "ff355e"), 725 | ("raspberry", "e30b5d"), 726 | ("raspberry-glace", "915f6d"), 727 | ("raspberry-pink", "e25098"), 728 | ("raspberry-rose", "b3446c"), 729 | ("raw-sienna", "d68a59"), 730 | ("razzle-dazzle-rose", "ff33cc"), 731 | ("razzmatazz", "e3256b"), 732 | ("red", "ff0000"), 733 | ("red-orange", "ff5349"), 734 | ("red-brown", "a52a2a"), 735 | ("red-violet", "c71585"), 736 | ("rich-black", "004040"), 737 | ("rich-carmine", "d70040"), 738 | ("rich-electric-blue", "0892d0"), 739 | ("rich-lilac", "b666d2"), 740 | ("rich-maroon", "b03060"), 741 | ("rifle-green", "414833"), 742 | ("robins-egg-blue", "1fcecb"), 743 | ("rose", "ff007f"), 744 | ("rose-bonbon", "f9429e"), 745 | ("rose-ebony", "674846"), 746 | ("rose-gold", "b76e79"), 747 | ("rose-madder", "e32636"), 748 | ("rose-pink", "ff66cc"), 749 | ("rose-quartz", "aa98a9"), 750 | ("rose-taupe", "905d5d"), 751 | ("rose-vale", "ab4e52"), 752 | ("rosewood", "65000b"), 753 | ("rosso-corsa", "d40000"), 754 | ("rosy-brown", "bc8f8f"), 755 | ("royal-azure", "0038a8"), 756 | ("royal-blue", "4169e1"), 757 | ("royal-fuchsia", "ca2c92"), 758 | ("royal-purple", "7851a9"), 759 | ("ruby", "e0115f"), 760 | ("ruddy", "ff0028"), 761 | ("ruddy-brown", "bb6528"), 762 | ("ruddy-pink", "e18e96"), 763 | ("rufous", "a81c07"), 764 | ("russet", "80461b"), 765 | ("rust", "b7410e"), 766 | ("sacramento-state-green", "00563f"), 767 | ("saddle-brown", "8b4513"), 768 | ("safety-orange", "ff6700"), 769 | ("saffron", "f4c430"), 770 | ("saint-patrick-blue", "23297a"), 771 | ("salmon", "ff8c69"), 772 | ("salmon-pink", "ff91a4"), 773 | ("sand", "c2b280"), 774 | ("sand-dune", "967117"), 775 | ("sandstorm", "ecd540"), 776 | ("sandy-brown", "f4a460"), 777 | ("sandy-taupe", "967117"), 778 | ("sap-green", "507d2a"), 779 | ("sapphire", "0f52ba"), 780 | ("satin-sheen-gold", "cba135"), 781 | ("scarlet", "ff2400"), 782 | ("school-bus-yellow", "ffd800"), 783 | ("screamin-green", "76ff7a"), 784 | ("sea-blue", "006994"), 785 | ("sea-green", "2e8b57"), 786 | ("seal-brown", "321414"), 787 | ("seashell", "fff5ee"), 788 | ("selective-yellow", "ffba00"), 789 | ("sepia", "704214"), 790 | ("shadow", "8a795d"), 791 | ("shamrock", "45cea2"), 792 | ("shamrock-green", "009e60"), 793 | ("shocking-pink", "fc0fc0"), 794 | ("sienna", "882d17"), 795 | ("silver", "c0c0c0"), 796 | ("sinopia", "cb410b"), 797 | ("skobeloff", "007474"), 798 | ("sky-blue", "87ceeb"), 799 | ("sky-magenta", "cf71af"), 800 | ("slate-blue", "6a5acd"), 801 | ("slate-gray", "708090"), 802 | ("smalt", "003399"), 803 | ("smokey-topaz", "933d41"), 804 | ("smoky-black", "100c08"), 805 | ("snow", "fffafa"), 806 | ("spiro-disco-ball", "0fc0fc"), 807 | ("spring-bud", "a7fc00"), 808 | ("spring-green", "00ff7f"), 809 | ("steel-blue", "4682b4"), 810 | ("stil-de-grain-yellow", "fada5e"), 811 | ("stizza", "990000"), 812 | ("stormcloud", "008080"), 813 | ("straw", "e4d96f"), 814 | ("sunglow", "ffcc33"), 815 | ("sunset", "fad6a5"), 816 | ("sunset-orange", "fd5e53"), 817 | ("tan", "d2b48c"), 818 | ("tangelo", "f94d00"), 819 | ("tangerine", "f28500"), 820 | ("tangerine-yellow", "ffcc00"), 821 | ("taupe", "483c32"), 822 | ("taupe-gray", "8b8589"), 823 | ("tawny", "cd5700"), 824 | ("tea-green", "d0f0c0"), 825 | ("tea-rose", "f4c2c2"), 826 | ("teal", "008080"), 827 | ("teal-blue", "367588"), 828 | ("teal-green", "006d5b"), 829 | ("terra-cotta", "e2725b"), 830 | ("thistle", "d8bfd8"), 831 | ("thulian-pink", "de6fa1"), 832 | ("tickle-me-pink", "fc89ac"), 833 | ("tiffany-blue", "0abab5"), 834 | ("tiger-eye", "e08d3c"), 835 | ("timberwolf", "dbd7d2"), 836 | ("titanium-yellow", "eee600"), 837 | ("tomato", "ff6347"), 838 | ("toolbox", "746cc0"), 839 | ("topaz", "ffc87c"), 840 | ("tractor-red", "fd0e35"), 841 | ("trolley-grey", "808080"), 842 | ("tropical-rain-forest", "00755e"), 843 | ("true-blue", "0073cf"), 844 | ("tufts-blue", "417dc1"), 845 | ("tumbleweed", "deaa88"), 846 | ("turkish-rose", "b57281"), 847 | ("turquoise", "30d5c8"), 848 | ("turquoise-blue", "00ffef"), 849 | ("turquoise-green", "a0d6b4"), 850 | ("tuscan-red", "66424d"), 851 | ("twilight-lavender", "8a496b"), 852 | ("tyrian-purple", "66023c"), 853 | ("ua-blue", "0033aa"), 854 | ("ua-red", "d9004c"), 855 | ("ucla-blue", "536895"), 856 | ("ucla-gold", "ffb300"), 857 | ("ufo-green", "3cd070"), 858 | ("up-forest-green", "014421"), 859 | ("up-maroon", "7b1113"), 860 | ("usc-cardinal", "990000"), 861 | ("usc-gold", "ffcc00"), 862 | ("ube", "8878c3"), 863 | ("ultra-pink", "ff6fff"), 864 | ("ultramarine", "120a8f"), 865 | ("ultramarine-blue", "4166f5"), 866 | ("umber", "635147"), 867 | ("united-nations-blue", "5b92e5"), 868 | ("university-of-california-gold", "b78727"), 869 | ("unmellow-yellow", "ffff66"), 870 | ("upsdell-red", "ae2029"), 871 | ("urobilin", "e1ad21"), 872 | ("utah-crimson", "d3003f"), 873 | ("vanilla", "f3e5ab"), 874 | ("vegas-gold", "c5b358"), 875 | ("venetian-red", "c80815"), 876 | ("verdigris", "43b3ae"), 877 | ("vermilion", "e34234"), 878 | ("veronica", "a020f0"), 879 | ("violet", "ee82ee"), 880 | ("violet-blue", "324ab2"), 881 | ("violet-red", "f75394"), 882 | ("viridian", "40826d"), 883 | ("vivid-auburn", "922724"), 884 | ("vivid-burgundy", "9f1d35"), 885 | ("vivid-cerise", "da1d81"), 886 | ("vivid-tangerine", "ffa089"), 887 | ("vivid-violet", "9f00ff"), 888 | ("warm-black", "004242"), 889 | ("waterspout", "00ffff"), 890 | ("wenge", "645452"), 891 | ("wheat", "f5deb3"), 892 | ("white", "ffffff"), 893 | ("white-smoke", "f5f5f5"), 894 | ("wild-strawberry", "ff43a4"), 895 | ("wild-watermelon", "fc6c85"), 896 | ("wild-blue-yonder", "a2add0"), 897 | ("wine", "722f37"), 898 | ("wisteria", "c9a0dc"), 899 | ("xanadu", "738678"), 900 | ("yale-blue", "0f4d92"), 901 | ("yellow", "ffff00"), 902 | ("yellow-orange", "ffae42"), 903 | ("yellow-green", "9acd32"), 904 | ("zaffre", "0014a8"), 905 | ("zinnwaldite-brown", "2c1608"), 906 | ]; 907 | 908 | /// Named colors variants. 909 | pub enum NamedColors { 910 | /// CSS named colors. 911 | Css, 912 | 913 | /// colorhexa colors by name. 914 | ColorHexa, 915 | } 916 | 917 | impl NamedColors { 918 | /// Returns a reference to one of color slices according to [`NamedColors`]. 919 | pub const fn get(&self) -> ColorCollection { 920 | match self { 921 | Self::Css => CSS, 922 | Self::ColorHexa => COLOR_HEXA, 923 | } 924 | } 925 | } 926 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler2" 16 | version = "2.0.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 19 | 20 | [[package]] 21 | name = "aho-corasick" 22 | version = "1.1.3" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 25 | dependencies = [ 26 | "memchr", 27 | ] 28 | 29 | [[package]] 30 | name = "argh" 31 | version = "0.1.13" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | checksum = "34ff18325c8a36b82f992e533ece1ec9f9a9db446bd1c14d4f936bac88fcd240" 34 | dependencies = [ 35 | "argh_derive", 36 | "argh_shared", 37 | "rust-fuzzy-search", 38 | ] 39 | 40 | [[package]] 41 | name = "argh_derive" 42 | version = "0.1.13" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "adb7b2b83a50d329d5d8ccc620f5c7064028828538bdf5646acd60dc1f767803" 45 | dependencies = [ 46 | "argh_shared", 47 | "proc-macro2", 48 | "quote", 49 | "syn", 50 | ] 51 | 52 | [[package]] 53 | name = "argh_shared" 54 | version = "0.1.13" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "a464143cc82dedcdc3928737445362466b7674b5db4e2eb8e869846d6d84f4f6" 57 | dependencies = [ 58 | "serde", 59 | ] 60 | 61 | [[package]] 62 | name = "async-trait" 63 | version = "0.1.88" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" 66 | dependencies = [ 67 | "proc-macro2", 68 | "quote", 69 | "syn", 70 | ] 71 | 72 | [[package]] 73 | name = "auto_impl" 74 | version = "1.2.1" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "e12882f59de5360c748c4cbf569a042d5fb0eb515f7bea9c1f470b47f6ffbd73" 77 | dependencies = [ 78 | "proc-macro2", 79 | "quote", 80 | "syn", 81 | ] 82 | 83 | [[package]] 84 | name = "autocfg" 85 | version = "1.4.0" 86 | source = "registry+https://github.com/rust-lang/crates.io-index" 87 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 88 | 89 | [[package]] 90 | name = "backtrace" 91 | version = "0.3.74" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" 94 | dependencies = [ 95 | "addr2line", 96 | "cfg-if", 97 | "libc", 98 | "miniz_oxide", 99 | "object", 100 | "rustc-demangle", 101 | "windows-targets", 102 | ] 103 | 104 | [[package]] 105 | name = "bit-set" 106 | version = "0.8.0" 107 | source = "registry+https://github.com/rust-lang/crates.io-index" 108 | checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" 109 | dependencies = [ 110 | "bit-vec", 111 | ] 112 | 113 | [[package]] 114 | name = "bit-vec" 115 | version = "0.8.0" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" 118 | 119 | [[package]] 120 | name = "bitflags" 121 | version = "1.3.2" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 124 | 125 | [[package]] 126 | name = "bitflags" 127 | version = "2.9.0" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 130 | 131 | [[package]] 132 | name = "bytes" 133 | version = "1.10.1" 134 | source = "registry+https://github.com/rust-lang/crates.io-index" 135 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 136 | 137 | [[package]] 138 | name = "cfg-if" 139 | version = "1.0.0" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 142 | 143 | [[package]] 144 | name = "crossbeam-utils" 145 | version = "0.8.21" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 148 | 149 | [[package]] 150 | name = "dashmap" 151 | version = "5.5.3" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" 154 | dependencies = [ 155 | "cfg-if", 156 | "hashbrown", 157 | "lock_api", 158 | "once_cell", 159 | "parking_lot_core", 160 | ] 161 | 162 | [[package]] 163 | name = "dashmap" 164 | version = "6.1.0" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" 167 | dependencies = [ 168 | "cfg-if", 169 | "crossbeam-utils", 170 | "hashbrown", 171 | "lock_api", 172 | "once_cell", 173 | "parking_lot_core", 174 | ] 175 | 176 | [[package]] 177 | name = "displaydoc" 178 | version = "0.2.5" 179 | source = "registry+https://github.com/rust-lang/crates.io-index" 180 | checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" 181 | dependencies = [ 182 | "proc-macro2", 183 | "quote", 184 | "syn", 185 | ] 186 | 187 | [[package]] 188 | name = "fancy-regex" 189 | version = "0.14.0" 190 | source = "registry+https://github.com/rust-lang/crates.io-index" 191 | checksum = "6e24cb5a94bcae1e5408b0effca5cd7172ea3c5755049c5f3af4cd283a165298" 192 | dependencies = [ 193 | "bit-set", 194 | "regex-automata", 195 | "regex-syntax", 196 | ] 197 | 198 | [[package]] 199 | name = "form_urlencoded" 200 | version = "1.2.1" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 203 | dependencies = [ 204 | "percent-encoding", 205 | ] 206 | 207 | [[package]] 208 | name = "futures" 209 | version = "0.3.31" 210 | source = "registry+https://github.com/rust-lang/crates.io-index" 211 | checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" 212 | dependencies = [ 213 | "futures-channel", 214 | "futures-core", 215 | "futures-io", 216 | "futures-sink", 217 | "futures-task", 218 | "futures-util", 219 | ] 220 | 221 | [[package]] 222 | name = "futures-channel" 223 | version = "0.3.31" 224 | source = "registry+https://github.com/rust-lang/crates.io-index" 225 | checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 226 | dependencies = [ 227 | "futures-core", 228 | "futures-sink", 229 | ] 230 | 231 | [[package]] 232 | name = "futures-core" 233 | version = "0.3.31" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 236 | 237 | [[package]] 238 | name = "futures-io" 239 | version = "0.3.31" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 242 | 243 | [[package]] 244 | name = "futures-macro" 245 | version = "0.3.31" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 248 | dependencies = [ 249 | "proc-macro2", 250 | "quote", 251 | "syn", 252 | ] 253 | 254 | [[package]] 255 | name = "futures-sink" 256 | version = "0.3.31" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 259 | 260 | [[package]] 261 | name = "futures-task" 262 | version = "0.3.31" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 265 | 266 | [[package]] 267 | name = "futures-util" 268 | version = "0.3.31" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 271 | dependencies = [ 272 | "futures-channel", 273 | "futures-core", 274 | "futures-io", 275 | "futures-macro", 276 | "futures-sink", 277 | "futures-task", 278 | "memchr", 279 | "pin-project-lite", 280 | "pin-utils", 281 | "slab", 282 | ] 283 | 284 | [[package]] 285 | name = "gimli" 286 | version = "0.31.1" 287 | source = "registry+https://github.com/rust-lang/crates.io-index" 288 | checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 289 | 290 | [[package]] 291 | name = "hashbrown" 292 | version = "0.14.5" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 295 | 296 | [[package]] 297 | name = "httparse" 298 | version = "1.10.1" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 301 | 302 | [[package]] 303 | name = "icu_collections" 304 | version = "1.5.0" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" 307 | dependencies = [ 308 | "displaydoc", 309 | "yoke", 310 | "zerofrom", 311 | "zerovec", 312 | ] 313 | 314 | [[package]] 315 | name = "icu_locid" 316 | version = "1.5.0" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" 319 | dependencies = [ 320 | "displaydoc", 321 | "litemap", 322 | "tinystr", 323 | "writeable", 324 | "zerovec", 325 | ] 326 | 327 | [[package]] 328 | name = "icu_locid_transform" 329 | version = "1.5.0" 330 | source = "registry+https://github.com/rust-lang/crates.io-index" 331 | checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" 332 | dependencies = [ 333 | "displaydoc", 334 | "icu_locid", 335 | "icu_locid_transform_data", 336 | "icu_provider", 337 | "tinystr", 338 | "zerovec", 339 | ] 340 | 341 | [[package]] 342 | name = "icu_locid_transform_data" 343 | version = "1.5.0" 344 | source = "registry+https://github.com/rust-lang/crates.io-index" 345 | checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" 346 | 347 | [[package]] 348 | name = "icu_normalizer" 349 | version = "1.5.0" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" 352 | dependencies = [ 353 | "displaydoc", 354 | "icu_collections", 355 | "icu_normalizer_data", 356 | "icu_properties", 357 | "icu_provider", 358 | "smallvec", 359 | "utf16_iter", 360 | "utf8_iter", 361 | "write16", 362 | "zerovec", 363 | ] 364 | 365 | [[package]] 366 | name = "icu_normalizer_data" 367 | version = "1.5.0" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" 370 | 371 | [[package]] 372 | name = "icu_properties" 373 | version = "1.5.1" 374 | source = "registry+https://github.com/rust-lang/crates.io-index" 375 | checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" 376 | dependencies = [ 377 | "displaydoc", 378 | "icu_collections", 379 | "icu_locid_transform", 380 | "icu_properties_data", 381 | "icu_provider", 382 | "tinystr", 383 | "zerovec", 384 | ] 385 | 386 | [[package]] 387 | name = "icu_properties_data" 388 | version = "1.5.0" 389 | source = "registry+https://github.com/rust-lang/crates.io-index" 390 | checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" 391 | 392 | [[package]] 393 | name = "icu_provider" 394 | version = "1.5.0" 395 | source = "registry+https://github.com/rust-lang/crates.io-index" 396 | checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" 397 | dependencies = [ 398 | "displaydoc", 399 | "icu_locid", 400 | "icu_provider_macros", 401 | "stable_deref_trait", 402 | "tinystr", 403 | "writeable", 404 | "yoke", 405 | "zerofrom", 406 | "zerovec", 407 | ] 408 | 409 | [[package]] 410 | name = "icu_provider_macros" 411 | version = "1.5.0" 412 | source = "registry+https://github.com/rust-lang/crates.io-index" 413 | checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" 414 | dependencies = [ 415 | "proc-macro2", 416 | "quote", 417 | "syn", 418 | ] 419 | 420 | [[package]] 421 | name = "idna" 422 | version = "1.0.3" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" 425 | dependencies = [ 426 | "idna_adapter", 427 | "smallvec", 428 | "utf8_iter", 429 | ] 430 | 431 | [[package]] 432 | name = "idna_adapter" 433 | version = "1.2.0" 434 | source = "registry+https://github.com/rust-lang/crates.io-index" 435 | checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" 436 | dependencies = [ 437 | "icu_normalizer", 438 | "icu_properties", 439 | ] 440 | 441 | [[package]] 442 | name = "itoa" 443 | version = "1.0.15" 444 | source = "registry+https://github.com/rust-lang/crates.io-index" 445 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 446 | 447 | [[package]] 448 | name = "libc" 449 | version = "0.2.171" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" 452 | 453 | [[package]] 454 | name = "litemap" 455 | version = "0.7.5" 456 | source = "registry+https://github.com/rust-lang/crates.io-index" 457 | checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" 458 | 459 | [[package]] 460 | name = "lock_api" 461 | version = "0.4.12" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 464 | dependencies = [ 465 | "autocfg", 466 | "scopeguard", 467 | ] 468 | 469 | [[package]] 470 | name = "lsp-types" 471 | version = "0.94.1" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "c66bfd44a06ae10647fe3f8214762e9369fd4248df1350924b4ef9e770a85ea1" 474 | dependencies = [ 475 | "bitflags 1.3.2", 476 | "serde", 477 | "serde_json", 478 | "serde_repr", 479 | "url", 480 | ] 481 | 482 | [[package]] 483 | name = "memchr" 484 | version = "2.7.4" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 487 | 488 | [[package]] 489 | name = "miniz_oxide" 490 | version = "0.8.5" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" 493 | dependencies = [ 494 | "adler2", 495 | ] 496 | 497 | [[package]] 498 | name = "mio" 499 | version = "1.0.3" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" 502 | dependencies = [ 503 | "libc", 504 | "wasi", 505 | "windows-sys", 506 | ] 507 | 508 | [[package]] 509 | name = "object" 510 | version = "0.36.7" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" 513 | dependencies = [ 514 | "memchr", 515 | ] 516 | 517 | [[package]] 518 | name = "once_cell" 519 | version = "1.21.1" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" 522 | 523 | [[package]] 524 | name = "parking_lot" 525 | version = "0.12.3" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 528 | dependencies = [ 529 | "lock_api", 530 | "parking_lot_core", 531 | ] 532 | 533 | [[package]] 534 | name = "parking_lot_core" 535 | version = "0.9.10" 536 | source = "registry+https://github.com/rust-lang/crates.io-index" 537 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 538 | dependencies = [ 539 | "cfg-if", 540 | "libc", 541 | "redox_syscall", 542 | "smallvec", 543 | "windows-targets", 544 | ] 545 | 546 | [[package]] 547 | name = "percent-encoding" 548 | version = "2.3.1" 549 | source = "registry+https://github.com/rust-lang/crates.io-index" 550 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 551 | 552 | [[package]] 553 | name = "pin-project" 554 | version = "1.1.10" 555 | source = "registry+https://github.com/rust-lang/crates.io-index" 556 | checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" 557 | dependencies = [ 558 | "pin-project-internal", 559 | ] 560 | 561 | [[package]] 562 | name = "pin-project-internal" 563 | version = "1.1.10" 564 | source = "registry+https://github.com/rust-lang/crates.io-index" 565 | checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" 566 | dependencies = [ 567 | "proc-macro2", 568 | "quote", 569 | "syn", 570 | ] 571 | 572 | [[package]] 573 | name = "pin-project-lite" 574 | version = "0.2.16" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 577 | 578 | [[package]] 579 | name = "pin-utils" 580 | version = "0.1.0" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 583 | 584 | [[package]] 585 | name = "proc-macro2" 586 | version = "1.0.94" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" 589 | dependencies = [ 590 | "unicode-ident", 591 | ] 592 | 593 | [[package]] 594 | name = "quote" 595 | version = "1.0.40" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 598 | dependencies = [ 599 | "proc-macro2", 600 | ] 601 | 602 | [[package]] 603 | name = "redox_syscall" 604 | version = "0.5.10" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" 607 | dependencies = [ 608 | "bitflags 2.9.0", 609 | ] 610 | 611 | [[package]] 612 | name = "regex-automata" 613 | version = "0.4.9" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 616 | dependencies = [ 617 | "aho-corasick", 618 | "memchr", 619 | "regex-syntax", 620 | ] 621 | 622 | [[package]] 623 | name = "regex-syntax" 624 | version = "0.8.5" 625 | source = "registry+https://github.com/rust-lang/crates.io-index" 626 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 627 | 628 | [[package]] 629 | name = "rust-fuzzy-search" 630 | version = "0.1.1" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "a157657054ffe556d8858504af8a672a054a6e0bd9e8ee531059100c0fa11bb2" 633 | 634 | [[package]] 635 | name = "rustc-demangle" 636 | version = "0.1.24" 637 | source = "registry+https://github.com/rust-lang/crates.io-index" 638 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 639 | 640 | [[package]] 641 | name = "ryu" 642 | version = "1.0.20" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 645 | 646 | [[package]] 647 | name = "scopeguard" 648 | version = "1.2.0" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 651 | 652 | [[package]] 653 | name = "serde" 654 | version = "1.0.219" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 657 | dependencies = [ 658 | "serde_derive", 659 | ] 660 | 661 | [[package]] 662 | name = "serde_derive" 663 | version = "1.0.219" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 666 | dependencies = [ 667 | "proc-macro2", 668 | "quote", 669 | "syn", 670 | ] 671 | 672 | [[package]] 673 | name = "serde_json" 674 | version = "1.0.140" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 677 | dependencies = [ 678 | "itoa", 679 | "memchr", 680 | "ryu", 681 | "serde", 682 | ] 683 | 684 | [[package]] 685 | name = "serde_repr" 686 | version = "0.1.20" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" 689 | dependencies = [ 690 | "proc-macro2", 691 | "quote", 692 | "syn", 693 | ] 694 | 695 | [[package]] 696 | name = "signal-hook-registry" 697 | version = "1.4.2" 698 | source = "registry+https://github.com/rust-lang/crates.io-index" 699 | checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" 700 | dependencies = [ 701 | "libc", 702 | ] 703 | 704 | [[package]] 705 | name = "slab" 706 | version = "0.4.9" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 709 | dependencies = [ 710 | "autocfg", 711 | ] 712 | 713 | [[package]] 714 | name = "smallvec" 715 | version = "1.14.0" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" 718 | 719 | [[package]] 720 | name = "socket2" 721 | version = "0.5.8" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" 724 | dependencies = [ 725 | "libc", 726 | "windows-sys", 727 | ] 728 | 729 | [[package]] 730 | name = "stable_deref_trait" 731 | version = "1.2.0" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 734 | 735 | [[package]] 736 | name = "syn" 737 | version = "2.0.100" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" 740 | dependencies = [ 741 | "proc-macro2", 742 | "quote", 743 | "unicode-ident", 744 | ] 745 | 746 | [[package]] 747 | name = "synstructure" 748 | version = "0.13.1" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 751 | dependencies = [ 752 | "proc-macro2", 753 | "quote", 754 | "syn", 755 | ] 756 | 757 | [[package]] 758 | name = "tinystr" 759 | version = "0.7.6" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" 762 | dependencies = [ 763 | "displaydoc", 764 | "zerovec", 765 | ] 766 | 767 | [[package]] 768 | name = "tokio" 769 | version = "1.44.1" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" 772 | dependencies = [ 773 | "backtrace", 774 | "bytes", 775 | "libc", 776 | "mio", 777 | "parking_lot", 778 | "pin-project-lite", 779 | "signal-hook-registry", 780 | "socket2", 781 | "tokio-macros", 782 | "windows-sys", 783 | ] 784 | 785 | [[package]] 786 | name = "tokio-macros" 787 | version = "2.5.0" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" 790 | dependencies = [ 791 | "proc-macro2", 792 | "quote", 793 | "syn", 794 | ] 795 | 796 | [[package]] 797 | name = "tokio-util" 798 | version = "0.7.14" 799 | source = "registry+https://github.com/rust-lang/crates.io-index" 800 | checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" 801 | dependencies = [ 802 | "bytes", 803 | "futures-core", 804 | "futures-sink", 805 | "pin-project-lite", 806 | "tokio", 807 | ] 808 | 809 | [[package]] 810 | name = "tower" 811 | version = "0.4.13" 812 | source = "registry+https://github.com/rust-lang/crates.io-index" 813 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 814 | dependencies = [ 815 | "futures-core", 816 | "futures-util", 817 | "pin-project", 818 | "pin-project-lite", 819 | "tower-layer", 820 | "tower-service", 821 | ] 822 | 823 | [[package]] 824 | name = "tower-layer" 825 | version = "0.3.3" 826 | source = "registry+https://github.com/rust-lang/crates.io-index" 827 | checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 828 | 829 | [[package]] 830 | name = "tower-lsp" 831 | version = "0.20.0" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "d4ba052b54a6627628d9b3c34c176e7eda8359b7da9acd497b9f20998d118508" 834 | dependencies = [ 835 | "async-trait", 836 | "auto_impl", 837 | "bytes", 838 | "dashmap 5.5.3", 839 | "futures", 840 | "httparse", 841 | "lsp-types", 842 | "memchr", 843 | "serde", 844 | "serde_json", 845 | "tokio", 846 | "tokio-util", 847 | "tower", 848 | "tower-lsp-macros", 849 | "tracing", 850 | ] 851 | 852 | [[package]] 853 | name = "tower-lsp-macros" 854 | version = "0.9.0" 855 | source = "registry+https://github.com/rust-lang/crates.io-index" 856 | checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa" 857 | dependencies = [ 858 | "proc-macro2", 859 | "quote", 860 | "syn", 861 | ] 862 | 863 | [[package]] 864 | name = "tower-service" 865 | version = "0.3.3" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 868 | 869 | [[package]] 870 | name = "tracing" 871 | version = "0.1.41" 872 | source = "registry+https://github.com/rust-lang/crates.io-index" 873 | checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 874 | dependencies = [ 875 | "pin-project-lite", 876 | "tracing-attributes", 877 | "tracing-core", 878 | ] 879 | 880 | [[package]] 881 | name = "tracing-attributes" 882 | version = "0.1.28" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" 885 | dependencies = [ 886 | "proc-macro2", 887 | "quote", 888 | "syn", 889 | ] 890 | 891 | [[package]] 892 | name = "tracing-core" 893 | version = "0.1.33" 894 | source = "registry+https://github.com/rust-lang/crates.io-index" 895 | checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 896 | dependencies = [ 897 | "once_cell", 898 | ] 899 | 900 | [[package]] 901 | name = "unicode-ident" 902 | version = "1.0.18" 903 | source = "registry+https://github.com/rust-lang/crates.io-index" 904 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 905 | 906 | [[package]] 907 | name = "url" 908 | version = "2.5.4" 909 | source = "registry+https://github.com/rust-lang/crates.io-index" 910 | checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" 911 | dependencies = [ 912 | "form_urlencoded", 913 | "idna", 914 | "percent-encoding", 915 | "serde", 916 | ] 917 | 918 | [[package]] 919 | name = "utf16_iter" 920 | version = "1.0.5" 921 | source = "registry+https://github.com/rust-lang/crates.io-index" 922 | checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" 923 | 924 | [[package]] 925 | name = "utf8_iter" 926 | version = "1.0.4" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 929 | 930 | [[package]] 931 | name = "uwu_colors" 932 | version = "0.4.0" 933 | dependencies = [ 934 | "argh", 935 | "dashmap 6.1.0", 936 | "fancy-regex", 937 | "tokio", 938 | "tower-lsp", 939 | ] 940 | 941 | [[package]] 942 | name = "wasi" 943 | version = "0.11.0+wasi-snapshot-preview1" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 946 | 947 | [[package]] 948 | name = "windows-sys" 949 | version = "0.52.0" 950 | source = "registry+https://github.com/rust-lang/crates.io-index" 951 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 952 | dependencies = [ 953 | "windows-targets", 954 | ] 955 | 956 | [[package]] 957 | name = "windows-targets" 958 | version = "0.52.6" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 961 | dependencies = [ 962 | "windows_aarch64_gnullvm", 963 | "windows_aarch64_msvc", 964 | "windows_i686_gnu", 965 | "windows_i686_gnullvm", 966 | "windows_i686_msvc", 967 | "windows_x86_64_gnu", 968 | "windows_x86_64_gnullvm", 969 | "windows_x86_64_msvc", 970 | ] 971 | 972 | [[package]] 973 | name = "windows_aarch64_gnullvm" 974 | version = "0.52.6" 975 | source = "registry+https://github.com/rust-lang/crates.io-index" 976 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 977 | 978 | [[package]] 979 | name = "windows_aarch64_msvc" 980 | version = "0.52.6" 981 | source = "registry+https://github.com/rust-lang/crates.io-index" 982 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 983 | 984 | [[package]] 985 | name = "windows_i686_gnu" 986 | version = "0.52.6" 987 | source = "registry+https://github.com/rust-lang/crates.io-index" 988 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 989 | 990 | [[package]] 991 | name = "windows_i686_gnullvm" 992 | version = "0.52.6" 993 | source = "registry+https://github.com/rust-lang/crates.io-index" 994 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 995 | 996 | [[package]] 997 | name = "windows_i686_msvc" 998 | version = "0.52.6" 999 | source = "registry+https://github.com/rust-lang/crates.io-index" 1000 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 1001 | 1002 | [[package]] 1003 | name = "windows_x86_64_gnu" 1004 | version = "0.52.6" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 1007 | 1008 | [[package]] 1009 | name = "windows_x86_64_gnullvm" 1010 | version = "0.52.6" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 1013 | 1014 | [[package]] 1015 | name = "windows_x86_64_msvc" 1016 | version = "0.52.6" 1017 | source = "registry+https://github.com/rust-lang/crates.io-index" 1018 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 1019 | 1020 | [[package]] 1021 | name = "write16" 1022 | version = "1.0.0" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" 1025 | 1026 | [[package]] 1027 | name = "writeable" 1028 | version = "0.5.5" 1029 | source = "registry+https://github.com/rust-lang/crates.io-index" 1030 | checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" 1031 | 1032 | [[package]] 1033 | name = "yoke" 1034 | version = "0.7.5" 1035 | source = "registry+https://github.com/rust-lang/crates.io-index" 1036 | checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" 1037 | dependencies = [ 1038 | "serde", 1039 | "stable_deref_trait", 1040 | "yoke-derive", 1041 | "zerofrom", 1042 | ] 1043 | 1044 | [[package]] 1045 | name = "yoke-derive" 1046 | version = "0.7.5" 1047 | source = "registry+https://github.com/rust-lang/crates.io-index" 1048 | checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" 1049 | dependencies = [ 1050 | "proc-macro2", 1051 | "quote", 1052 | "syn", 1053 | "synstructure", 1054 | ] 1055 | 1056 | [[package]] 1057 | name = "zerofrom" 1058 | version = "0.1.6" 1059 | source = "registry+https://github.com/rust-lang/crates.io-index" 1060 | checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" 1061 | dependencies = [ 1062 | "zerofrom-derive", 1063 | ] 1064 | 1065 | [[package]] 1066 | name = "zerofrom-derive" 1067 | version = "0.1.6" 1068 | source = "registry+https://github.com/rust-lang/crates.io-index" 1069 | checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" 1070 | dependencies = [ 1071 | "proc-macro2", 1072 | "quote", 1073 | "syn", 1074 | "synstructure", 1075 | ] 1076 | 1077 | [[package]] 1078 | name = "zerovec" 1079 | version = "0.10.4" 1080 | source = "registry+https://github.com/rust-lang/crates.io-index" 1081 | checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" 1082 | dependencies = [ 1083 | "yoke", 1084 | "zerofrom", 1085 | "zerovec-derive", 1086 | ] 1087 | 1088 | [[package]] 1089 | name = "zerovec-derive" 1090 | version = "0.10.3" 1091 | source = "registry+https://github.com/rust-lang/crates.io-index" 1092 | checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" 1093 | dependencies = [ 1094 | "proc-macro2", 1095 | "quote", 1096 | "syn", 1097 | ] 1098 | --------------------------------------------------------------------------------