diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 5dc3dd9..172677b 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -40,3 +40,8 @@ model LocationObjectStorage { id String @id objects Json @default("[]") } + +model KeyValueStore { + id Int @id @default(0) + json Json @default("{}") +} diff --git a/src/api/commands/groups/fishing/fish.ts b/src/api/commands/groups/fishing/fish.ts index 84ea854..59e5f23 100644 --- a/src/api/commands/groups/fishing/fish.ts +++ b/src/api/commands/groups/fishing/fish.ts @@ -1,4 +1,5 @@ import Command from "@server/commands/Command"; +import { getFishing, startFishing } from "@server/fish/fishers"; export const fish = new Command( "fish", @@ -7,6 +8,17 @@ export const fish = new Command( "fish", "command.fishing.fish", async ({ id, command, args, prefix, part, user }) => { - return "There is no fishing yet, please come back later when I write the code for it"; + const fishing = getFishing(id, part.id); + + if (!fishing) { + startFishing(id, part.id); + return `Our friend ${part.name} casts LURE into a water for catching fish.`; + } else { + return `Your lure is already in the water (since ${( + (Date.now() - fishing.t) / + 1000 / + 60 + ).toFixed(2)} minutes ago).`; + } } ); diff --git a/src/api/commands/groups/fishing/reel.ts b/src/api/commands/groups/fishing/reel.ts new file mode 100644 index 0000000..8eeb2d9 --- /dev/null +++ b/src/api/commands/groups/fishing/reel.ts @@ -0,0 +1,21 @@ +import Command from "@server/commands/Command"; +import { getInventory } from "@server/data/inventory"; +import { getFishing, stopFishing } from "@server/fish/fishers"; +import { locations } from "@server/fish/locations"; + +export const reel = new Command( + "reel", + ["reel"], + "Reel in and stop fishing", + "fishing", + "command.fishing.reel", + async ({ id, command, args, prefix, part, user }) => { + const fishing = getFishing(id, part.id); + if (fishing) { + stopFishing(id, part.id); + return `Our friend ${part.name} reel his/her lure back inside, temporarily decreasing his/her chances of catching a fish by 100%.`; + } else { + return `Friend ${part.name}: You haven't /casted it.`; + } + } +); diff --git a/src/api/commands/groups/general/help.ts b/src/api/commands/groups/general/help.ts index f6b9fe3..866d687 100644 --- a/src/api/commands/groups/general/help.ts +++ b/src/api/commands/groups/general/help.ts @@ -23,16 +23,20 @@ export const help = new Command( "command.general.help", async ({ id, command, args, prefix, part, user }) => { if (!args[0]) { - return `__Fishing:__\n${commandGroups - .map( - group => - `${group.displayName}: ${group.commands - .map(cmd => - cmd.visible ? cmd.aliases[0] : "" - ) - .join(", ")}` - ) - .join("\n")}`; + const list = []; + + for (const group of commandGroups) { + let list2 = []; + + for (const cmd of group.commands) { + if (cmd.visible) list2.push(cmd.aliases[0]); + } + + if (list2.length > 0) + list.push(`${group.displayName}: ${list2.join(", ")}`); + } + + return `__Fishing:__\n${list.join("\n")}`; } else { const commands = commandGroups.flatMap(group => group.commands); diff --git a/src/api/commands/groups/general/inventory.ts b/src/api/commands/groups/general/inventory.ts deleted file mode 100644 index 3e22ed3..0000000 --- a/src/api/commands/groups/general/inventory.ts +++ /dev/null @@ -1,25 +0,0 @@ -import Command from "@server/commands/Command"; -import { getInventory } from "@server/data/inventory"; - -export const inventory = new Command( - "inventory", - ["inventory", "inv"], - "Look at your inventory", - "data", - "command.util.inventory", - async ({ id, command, args, prefix, part, user }) => { - const inventory = await getInventory(user.inventoryId); - if (!inventory) return; - - const items = inventory.items as unknown as IItem[]; - - return `Inventory: ${items - .map( - item => - `${item.emoji || ""}${item.name}${ - item.count ? ` (x${item.count})` : "" - }` - ) - .join(", ")}`; - } -); diff --git a/src/api/commands/groups/index.ts b/src/api/commands/groups/index.ts index 0e39d2b..17ac941 100644 --- a/src/api/commands/groups/index.ts +++ b/src/api/commands/groups/index.ts @@ -7,8 +7,11 @@ import { location } from "./fishing/location"; import { go } from "./fishing/go"; import { nearby } from "./fishing/nearby"; import { look } from "./fishing/look"; -import { take } from "./fishing/take"; -import { inventory } from "./general/inventory"; +import { take } from "./inventory/take"; +import { inventory } from "./inventory/inventory"; +import { eat } from "./inventory/eat"; +import { sack } from "./inventory/sack"; +import { reel } from "./fishing/reel"; interface ICommandGroup { id: string; @@ -18,26 +21,34 @@ interface ICommandGroup { export const commandGroups: ICommandGroup[] = []; -const general: ICommandGroup = { +const generalGroup: ICommandGroup = { id: "general", displayName: "General", - commands: [help, inventory] + commands: [help] }; -commandGroups.push(general); +commandGroups.push(generalGroup); -const fishing: ICommandGroup = { +const fishingGroup: ICommandGroup = { id: "fishing", displayName: "Fishing", - commands: [fish, location, go, nearby, look, take] + commands: [fish, reel, location, go, nearby, look] }; -commandGroups.push(fishing); +commandGroups.push(fishingGroup); -const util: ICommandGroup = { +const inventoryGroup: ICommandGroup = { + id: "inventory", + displayName: "Inventory", + commands: [inventory, take, eat, sack] +}; + +commandGroups.push(inventoryGroup); + +const utilGroup: ICommandGroup = { id: "util", displayName: "Utility", commands: [data, setcolor] }; -commandGroups.push(util); +commandGroups.push(utilGroup); diff --git a/src/api/commands/groups/inventory/eat.ts b/src/api/commands/groups/inventory/eat.ts new file mode 100644 index 0000000..dd3f4f9 --- /dev/null +++ b/src/api/commands/groups/inventory/eat.ts @@ -0,0 +1,148 @@ +import { addBack } from "@server/backs"; +import Command from "@server/commands/Command"; +import { logger } from "@server/commands/handler"; +import { getInventory, updateInventory } from "@server/data/inventory"; +import { CosmicColor } from "@util/CosmicColor"; + +export const eat = new Command( + "eat", + ["eat"], + "Eat literally anything in your inventory", + "eat ", + "command.inventory.eat", + async ({ id, command, args, prefix, part, user }) => { + const eating = args[0]; + if (!eating) return `What do you want to ${prefix}eat?`; + const inventory = await getInventory(user.inventoryId); + if (!inventory) return; + + let foundObject: IObject | undefined; + let tryChangingColor = false; + + for (const item of inventory.items as unknown as IItem[]) { + if (!item.name.toLowerCase().includes(eating.toLowerCase())) + continue; + + foundObject = item; + + let shouldRemove = false; + + if (item.count) { + if (item.count > 1) { + shouldRemove = false; + ((inventory.items as unknown as IItem[])[ + (inventory.items as unknown as IItem[]).indexOf(item) + ].count as number)--; + } else { + shouldRemove = true; + } + } else { + shouldRemove = true; + } + + if (shouldRemove) + (inventory.items as unknown as IItem[]).splice( + (inventory.items as unknown as IItem[]).indexOf(item, 1) + ); + break; + } + + for (const pokemon of inventory.pokemon as unknown as IPokemon[]) { + if (!pokemon.name.toLowerCase().includes(eating.toLowerCase())) + continue; + + foundObject = pokemon as unknown as IObject; + + let shouldRemove = false; + + if (pokemon.count) { + if (pokemon.count > 1) { + shouldRemove = false; + ((inventory.pokemon as unknown as IPokemon[])[ + (inventory.pokemon as unknown as IPokemon[]).indexOf( + pokemon + ) + ].count as number)--; + } else { + shouldRemove = true; + } + } else { + shouldRemove = true; + } + + if (shouldRemove) + (inventory.pokemon as unknown as IPokemon[]).splice( + (inventory.pokemon as unknown as IPokemon[]).indexOf( + pokemon, + 1 + ) + ); + break; + } + + for (const fish of inventory.fishSack as unknown as IFish[]) { + if (!fish.name.toLowerCase().includes(eating.toLowerCase())) + continue; + + foundObject = fish as unknown as IObject; + + let shouldRemove = false; + + if (fish.count) { + if (fish.count > 1) { + shouldRemove = false; + ((inventory.fishSack as unknown as IFish[])[ + (inventory.fishSack as unknown as IFish[]).indexOf(fish) + ].count as number)--; + } else { + shouldRemove = true; + } + } else { + shouldRemove = true; + } + + if (shouldRemove) + (inventory.fishSack as unknown as IFish[]).splice( + (inventory.fishSack as unknown as IFish[]).indexOf(fish, 1) + ); + break; + } + + if (!foundObject) return `You don't have "${eating}" to eat.`; + if (foundObject.objtype == "fish") { + tryChangingColor = true; + } + + await updateInventory(inventory); + + if (!tryChangingColor) { + if (foundObject.id == "sand") { + return `Our friend ${part.name} ate of his/her ${foundObject.name}.`; + } else { + return `Our friend ${part.name} ate his/her ${foundObject.name}.`; + } + } else { + const r = Math.random(); + + if (r < 0.3) { + const color = new CosmicColor( + Math.floor(Math.random() * 255), + Math.floor(Math.random() * 255), + Math.floor(Math.random() * 255) + ); + + addBack(id, { + m: "color", + id: part.id, + color: color.toHexa() + }); + + return `Our friend ${part.name} at his/her ${ + foundObject.name + } and it made him/her turn ${color.getName().toLowerCase()}.`; + } else { + return `Our friend ${part.name} at his/her ${foundObject.name}.`; + } + } + } +); diff --git a/src/api/commands/groups/inventory/inventory.ts b/src/api/commands/groups/inventory/inventory.ts new file mode 100644 index 0000000..0317751 --- /dev/null +++ b/src/api/commands/groups/inventory/inventory.ts @@ -0,0 +1,27 @@ +import Command from "@server/commands/Command"; +import { getInventory } from "@server/data/inventory"; + +export const inventory = new Command( + "inventory", + ["inventory", "inv", "i"], + "Look at your inventory", + "inventory", + "command.inventory.inventory", + async ({ id, command, args, prefix, part, user }) => { + const inv = await getInventory(user.inventoryId); + if (!inv) return; + + const items = inv.items as unknown as IItem[]; + + return `Inventory: ${ + items + .map( + item => + `${item.emoji || ""}${item.name}${ + item.count ? ` (x${item.count})` : "" + }` + ) + .join(", ") || "(none)" + }`; + } +); diff --git a/src/api/commands/groups/inventory/sack.ts b/src/api/commands/groups/inventory/sack.ts new file mode 100644 index 0000000..cab7c75 --- /dev/null +++ b/src/api/commands/groups/inventory/sack.ts @@ -0,0 +1,27 @@ +import Command from "@server/commands/Command"; +import { getInventory } from "@server/data/inventory"; + +export const sack = new Command( + "sack", + ["sack", "caught"], + "Look at your fish sack", + "sack", + "command.inventory.sack", + async ({ id, command, args, prefix, part, user }) => { + const inv = await getInventory(user.inventoryId); + if (!inv) return; + + const fishSack = inv.fishSack as TFishSack; + + return `Contents of ${part.name}'s fish sack: ${ + fishSack + .map( + (fish: IFish) => + `${fish.emoji || ""}${fish.name}${ + fish.count ? ` (x${fish.count})` : "" + }` + ) + .join(", ") || "(none)" + }`; + } +); diff --git a/src/api/commands/groups/fishing/take.ts b/src/api/commands/groups/inventory/take.ts similarity index 89% rename from src/api/commands/groups/fishing/take.ts rename to src/api/commands/groups/inventory/take.ts index a2a715d..4830947 100644 --- a/src/api/commands/groups/fishing/take.ts +++ b/src/api/commands/groups/inventory/take.ts @@ -1,8 +1,8 @@ import Command from "@server/commands/Command"; import { logger } from "@server/commands/handler"; import { getInventory, updateInventory } from "@server/data/inventory"; -import { locations } from "@server/fish/locations"; -import { go } from "./go"; +import { locations, saveObjects } from "@server/fish/locations"; +import { go } from "../fishing/go"; import { addItem } from "@server/items"; export const take = new Command( @@ -10,7 +10,7 @@ export const take = new Command( ["take"], "Take something from your surroundings", "take ", - "command.fishing.take", + "command.inventory.take", async ({ id, command, args, prefix, part, user }) => { let taking = args[0]; @@ -34,6 +34,9 @@ export const take = new Command( for (const obj of loc.objects) { if (obj.name.toLowerCase().includes(taking.toLowerCase())) foundObject = obj; + + loc.objects.splice(loc.objects.indexOf(obj), 1); + await saveObjects(); } if (!foundObject) return `There is no "${taking}" here.`; @@ -57,6 +60,7 @@ export const take = new Command( (inventory as any).pokemon = pokemon; await updateInventory(inventory); + return `You picked up the ${foundObject.name}.`; } ); diff --git a/src/api/commands/groups/util/data.ts b/src/api/commands/groups/util/data.ts index 15559f4..561f708 100644 --- a/src/api/commands/groups/util/data.ts +++ b/src/api/commands/groups/util/data.ts @@ -8,5 +8,6 @@ export const data = new Command( "command.util.data", async props => { return JSON.stringify(props); - } + }, + false ); diff --git a/src/api/commands/groups/util/setcolor.ts b/src/api/commands/groups/util/setcolor.ts index 7098b3f..4a604a8 100644 --- a/src/api/commands/groups/util/setcolor.ts +++ b/src/api/commands/groups/util/setcolor.ts @@ -17,5 +17,6 @@ export const setcolor = new Command( }); return "Attempting to set color."; - } + }, + false ); diff --git a/src/api/data/keyValueStore.ts b/src/api/data/keyValueStore.ts new file mode 100644 index 0000000..24e71a3 --- /dev/null +++ b/src/api/data/keyValueStore.ts @@ -0,0 +1,37 @@ +import prisma from "./prisma"; + +export async function createKeyValueStore() { + return await prisma.keyValueStore.create({ + data: {} + }); +} + +export async function getkvInternal() { + const kv = await prisma.keyValueStore.findUnique({ + where: { id: 0 } + }); + + if (!kv) return await createKeyValueStore(); + return kv; +} + +export async function kvSet(key: string, value: any) { + const kv = await getkvInternal(); + + (kv.json as any)[key] = value; + + return await prisma.keyValueStore.update({ + where: { + id: 0 + }, + data: { + json: kv.json as any + } + }); +} + +export async function kvGet(key: string) { + const kv = await getkvInternal(); + + return (kv.json as any)[key]; +} diff --git a/src/api/fish/fishers.ts b/src/api/fish/fishers.ts new file mode 100644 index 0000000..5f4dbd8 --- /dev/null +++ b/src/api/fish/fishers.ts @@ -0,0 +1,111 @@ +import { kvGet, kvSet } from "@server/data/keyValueStore"; +import { getObjectStorage } from "@server/data/location"; +import { addTickEvent, removeTickEvent } from "@util/tick"; +import { randomFish } from "./fish"; +import { getUser } from "@server/data/user"; +import { getInventory, updateInventory } from "@server/data/inventory"; +import { addItem } from "@server/items"; +import { addBack } from "@server/backs"; +import { prefixes } from "@server/commands/prefixes"; +import { Logger } from "@util/Logger"; + +export let fishers: Record< + string, + { + id: string; + userId: string; + t: number; + } +> = {}; + +let cooldown = Date.now() + 5000; + +const logger = new Logger("Fishermen"); + +export async function tick() { + if (Date.now() > cooldown) { + cooldown = Date.now() + 5000; + + let winner = + Object.values(fishers)[ + Math.floor(Math.random() * Object.values(fishers).length) + ]; + + if (!winner) return; + + const user = await getUser(winner.userId); + + if (!user) { + stopFishing(winner.id, winner.userId); + return; + } + + const inventory = await getInventory(user.inventoryId); + + if (!inventory) { + stopFishing(winner.id, winner.userId); + return; + } + + const r = Math.random(); + + if (r < 0.1) { + stopFishing(winner.id, winner.userId); + const animal = randomFish(inventory.location); + addItem(inventory.fishSack as TFishSack, animal); + await updateInventory(inventory); + const size = + animal.size < 30 + ? "small" + : animal.size < 60 + ? "medium-sized" + : animal.size < 75 + ? "large" + : animal.size < 100 + ? "huge" + : "massive"; + addBack(winner.id, { + m: "sendchat", + message: `Our good friend ${user.name} caught a ${size} ${ + animal.emoji || "🐟" + }${animal.name}! ready to ${prefixes[0]}eat or ${ + prefixes[0] + }fish again` + }); + } + } + + await kvSet("fishers", fishers); +} + +export async function startFisherTick() { + let maybe = (await kvGet("fishers")) as Record< + string, + { + id: string; + userId: string; + t: number; + } + >; + + if (maybe) fishers = maybe; + + addTickEvent(tick); +} + +export function stopFisherTick() { + removeTickEvent(tick); +} + +export function startFishing(id: string, userId: string) { + fishers[id + "~" + userId] = { id, userId: userId, t: Date.now() }; +} + +export function stopFishing(id: string, userId: string) { + let key = id + "~" + userId; + delete fishers[key]; +} + +export function getFishing(id: string, userId: string) { + return fishers[id + "~" + userId]; +} diff --git a/src/api/index.ts b/src/api/index.ts index 7472f35..b9e69b1 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,5 +1,7 @@ import "./api/server"; import "./cli/readline"; +import { startFisherTick } from "./fish/fishers"; import { startObjectTimers } from "./fish/locations"; startObjectTimers(); +await startFisherTick(); diff --git a/src/mpp/bot/Bot.ts b/src/mpp/bot/Bot.ts index afeb114..96deb22 100644 --- a/src/mpp/bot/Bot.ts +++ b/src/mpp/bot/Bot.ts @@ -153,7 +153,7 @@ export class MPPNetBot { try { const backs = (await trpc.backs.query()) as IBack[]; if (backs.length > 0) { - this.logger.debug(backs); + // this.logger.debug(backs); for (const back of backs) { if (typeof back.m !== "string") return; this.b.emit(back.m, back); @@ -175,6 +175,10 @@ export class MPPNetBot { } ]); }); + + this.b.on("sendchat", msg => { + this.sendChat(msg.message); + }); } public sendChat(text: string, reply?: string) { diff --git a/src/util/CosmicColor.ts b/src/util/CosmicColor.ts new file mode 100644 index 0000000..6c99980 --- /dev/null +++ b/src/util/CosmicColor.ts @@ -0,0 +1,1085 @@ +export class CosmicColor { + public r: number; + public g: number; + public b: number; + + constructor(...args: number[] | string[]) { + let r: number | undefined; + let g: number | undefined; + let b: number | undefined; + + if (args.length === 1) { + let hexa = (args[0] as string).toLowerCase(); + + if (hexa.match(/^#[0-9a-f]{6}$/i)) { + (hexa as any) = + /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(hexa); + if (hexa && hexa.length === 4) { + r = parseInt(hexa[1], 16); + g = parseInt(hexa[2], 16); + b = parseInt(hexa[3], 16); + } + } + } else if (args.length === 3) { + r = args[0] as number; + g = args[1] as number; + b = args[2] as number; + } + + if (!r) r = 0; + if (!g) g = 0; + if (!b) b = 0; + + this.r = ~~r || 0; + this.g = ~~g || 0; + this.b = ~~b || 0; + } + + private static map: Record = {}; + + public static addToMap(hexa: string, name: string) { + CosmicColor.map[name] = new CosmicColor(hexa); + } + + public distance(color: CosmicColor) { + let d = 0; + + d += Math.pow(this.r - color.r, 2); + d += Math.pow(this.g - color.g, 2); + d += Math.pow(this.b - color.b, 2); + + return Math.abs(Math.sqrt(d)); + } + + public add(r: number, g: number, b: number): void { + this.r += r; + this.g += g; + this.b += b; + + if (this.r < 0) { + this.r = 0; + } else if (this.r > 255) { + this.r = 255; + } + + if (this.g < 0) { + this.g = 0; + } else if (this.g > 255) { + this.g = 255; + } + + if (this.b < 0) { + this.b = 0; + } else if (this.b > 255) { + this.b = 255; + } + } + + public toHexa(): string { + let r = (~~this.r || 0).toString(16); + let g = (~~this.g || 0).toString(16); + let b = (~~this.b || 0).toString(16); + + if (r.length === 1) r = "0" + r; + if (g.length === 1) g = "0" + g; + if (b.length === 1) b = "0" + b; + + return "#" + r + g + b; + } + + public getName(): string { + let low = 256; + let name; + + for (const n in CosmicColor.map) { + if (!CosmicColor.map.hasOwnProperty(n)) { + continue; + } + + const color: any = CosmicColor.map[n]; + + if ( + color.r === this.r && + color.g === this.g && + color.b === this.b + ) { + return n; + } + + const dist = this.distance(color); + if (dist < low) { + low = dist; + name = n; + } + } + + if (!name) { + name = this.toHexa(); + } else { + name = "A shade of " + name; + } + + return name; + } +} + +CosmicColor.addToMap("#7CB9E8", "Aero"); +CosmicColor.addToMap("#C9FFE5", "Aero blue"); +CosmicColor.addToMap("#B284BE", "African purple"); +CosmicColor.addToMap("#5D8AA8", "Air Force blue (RAF)"); +CosmicColor.addToMap("#00308F", "Air Force blue (USAF)"); +CosmicColor.addToMap("#72A0C1", "Air superiority blue"); +CosmicColor.addToMap("#AF002A", "Alabama Crimson"); +CosmicColor.addToMap("#F0F8FF", "Alice blue"); +CosmicColor.addToMap("#E32636", "Alizarin crimson"); +CosmicColor.addToMap("#C46210", "Alloy orange"); +CosmicColor.addToMap("#EFDECD", "Almond"); +CosmicColor.addToMap("#E52B50", "Amaranth"); +CosmicColor.addToMap("#F19CBB", "Amaranth pink"); +CosmicColor.addToMap("#AB274F", "Dark amaranth"); +CosmicColor.addToMap("#3B7A57", "Amazon"); +CosmicColor.addToMap("#FF7E00", "Amber"); +CosmicColor.addToMap("#FF033E", "American rose"); +CosmicColor.addToMap("#9966CC", "Amethyst"); +CosmicColor.addToMap("#A4C639", "Android green"); +CosmicColor.addToMap("#F2F3F4", "Anti-flash white"); +CosmicColor.addToMap("#CD9575", "Antique brass"); +CosmicColor.addToMap("#665D1E", "Antique bronze"); +CosmicColor.addToMap("#915C83", "Antique fuchsia"); +CosmicColor.addToMap("#841B2D", "Antique ruby"); +CosmicColor.addToMap("#FAEBD7", "Antique white"); +CosmicColor.addToMap("#8DB600", "Apple green"); +CosmicColor.addToMap("#FBCEB1", "Apricot"); +CosmicColor.addToMap("#00FFFF", "Aqua"); +CosmicColor.addToMap("#7FFFD4", "Aquamarine"); +CosmicColor.addToMap("#4B5320", "Army green"); +CosmicColor.addToMap("#3B444B", "Arsenic"); +CosmicColor.addToMap("#8F9779", "Artichoke"); +CosmicColor.addToMap("#B2BEB5", "Ash grey"); +CosmicColor.addToMap("#87A96B", "Asparagus"); +CosmicColor.addToMap("#FDEE00", "Aureolin"); +CosmicColor.addToMap("#6E7F80", "AuroMetalSaurus"); +CosmicColor.addToMap("#568203", "Avocado"); +CosmicColor.addToMap("#007FFF", "Azure"); +CosmicColor.addToMap("#F0FFFF", "Azure mist/web"); +CosmicColor.addToMap("#89CFF0", "Baby blue"); +CosmicColor.addToMap("#A1CAF1", "Baby blue eyes"); +CosmicColor.addToMap("#FEFEFA", "Baby powder"); +CosmicColor.addToMap("#FF91AF", "Baker-Miller pink"); +CosmicColor.addToMap("#21ABCD", "Ball blue"); +CosmicColor.addToMap("#FAE7B5", "Banana Mania"); +CosmicColor.addToMap("#FFE135", "Banana yellow"); +CosmicColor.addToMap("#E0218A", "Barbie pink"); +CosmicColor.addToMap("#7C0A02", "Barn red"); +CosmicColor.addToMap("#848482", "Battleship grey"); +CosmicColor.addToMap("#98777B", "Bazaar"); +CosmicColor.addToMap("#9F8170", "Beaver"); +CosmicColor.addToMap("#F5F5DC", "Beige"); +CosmicColor.addToMap("#2E5894", "B'dazzled blue"); +CosmicColor.addToMap("#9C2542", "Big dip o’ruby"); +CosmicColor.addToMap("#FFE4C4", "Bisque"); +CosmicColor.addToMap("#3D2B1F", "Bistre"); +CosmicColor.addToMap("#967117", "Bistre brown"); +CosmicColor.addToMap("#CAE00D", "Bitter lemon"); +CosmicColor.addToMap("#648C11", "Bitter lime"); +CosmicColor.addToMap("#FE6F5E", "Bittersweet"); +CosmicColor.addToMap("#BF4F51", "Bittersweet shimmer"); +CosmicColor.addToMap("#000000", "Black"); +CosmicColor.addToMap("#3D0C02", "Black bean"); +CosmicColor.addToMap("#253529", "Black leather jacket"); +CosmicColor.addToMap("#3B3C36", "Black olive"); +CosmicColor.addToMap("#FFEBCD", "Blanched almond"); +CosmicColor.addToMap("#A57164", "Blast-off bronze"); +CosmicColor.addToMap("#318CE7", "Bleu de France"); +CosmicColor.addToMap("#ACE5EE", "Blizzard Blue"); +CosmicColor.addToMap("#FAF0BE", "Blond"); +CosmicColor.addToMap("#0000FF", "Blue"); +CosmicColor.addToMap("#1F75FE", "Blue (Crayola)"); +CosmicColor.addToMap("#0093AF", "Blue (Munsell)"); +CosmicColor.addToMap("#0087BD", "Blue (NCS)"); +CosmicColor.addToMap("#333399", "Blue (pigment)"); +CosmicColor.addToMap("#0247FE", "Blue (RYB)"); +CosmicColor.addToMap("#A2A2D0", "Blue Bell"); +CosmicColor.addToMap("#6699CC", "Blue-gray"); +CosmicColor.addToMap("#0D98BA", "Blue-green"); +CosmicColor.addToMap("#126180", "Blue sapphire"); +CosmicColor.addToMap("#8A2BE2", "Blue-violet"); +CosmicColor.addToMap("#5072A7", "Blue yonder"); +CosmicColor.addToMap("#4F86F7", "Blueberry"); +CosmicColor.addToMap("#1C1CF0", "Bluebonnet"); +CosmicColor.addToMap("#DE5D83", "Blush"); +CosmicColor.addToMap("#79443B", "Bole Brown"); +CosmicColor.addToMap("#0095B6", "Bondi blue"); +CosmicColor.addToMap("#E3DAC9", "Bone"); +CosmicColor.addToMap("#CC0000", "Boston University Red"); +CosmicColor.addToMap("#006A4E", "Bottle green"); +CosmicColor.addToMap("#873260", "Boysenberry"); +CosmicColor.addToMap("#0070FF", "Brandeis blue"); +CosmicColor.addToMap("#B5A642", "Brass"); +CosmicColor.addToMap("#CB4154", "Brick red"); +CosmicColor.addToMap("#1DACD6", "Bright cerulean"); +CosmicColor.addToMap("#66FF00", "Bright green"); +CosmicColor.addToMap("#BF94E4", "Bright lavender"); +CosmicColor.addToMap("#D891EF", "Bright lilac"); +CosmicColor.addToMap("#C32148", "Bright maroon"); +CosmicColor.addToMap("#1974D2", "Bright navy blue"); +CosmicColor.addToMap("#FF007F", "Bright pink"); +CosmicColor.addToMap("#08E8DE", "Bright turquoise"); +CosmicColor.addToMap("#D19FE8", "Bright ube"); +CosmicColor.addToMap("#F4BBFF", "Brilliant lavender"); +CosmicColor.addToMap("#FF55A3", "Brilliant rose"); +CosmicColor.addToMap("#FB607F", "Brink pink"); +CosmicColor.addToMap("#004225", "British racing green"); +CosmicColor.addToMap("#CD7F32", "Bronze"); +CosmicColor.addToMap("#737000", "Bronze Yellow"); +CosmicColor.addToMap("#964B00", "Brown"); +CosmicColor.addToMap("#6B4423", "Brown-nose"); +CosmicColor.addToMap("#FFC1CC", "Bubble gum"); +CosmicColor.addToMap("#E7FEFF", "Bubbles"); +CosmicColor.addToMap("#F0DC82", "Buff"); +CosmicColor.addToMap("#7BB661", "Bud green"); +CosmicColor.addToMap("#480607", "Bulgarian rose"); +CosmicColor.addToMap("#800020", "Burgundy"); +CosmicColor.addToMap("#DEB887", "Burlywood"); +CosmicColor.addToMap("#CC5500", "Burnt orange"); +CosmicColor.addToMap("#8A3324", "Burnt umber"); +CosmicColor.addToMap("#BD33A4", "Byzantine"); +CosmicColor.addToMap("#702963", "Byzantium"); +CosmicColor.addToMap("#536872", "Cadet"); +CosmicColor.addToMap("#5F9EA0", "Cadet blue"); +CosmicColor.addToMap("#91A3B0", "Cadet grey"); +CosmicColor.addToMap("#006B3C", "Cadmium green"); +CosmicColor.addToMap("#ED872D", "Cadmium orange"); +CosmicColor.addToMap("#E30022", "Cadmium red"); +CosmicColor.addToMap("#FFF600", "Cadmium yellow"); +CosmicColor.addToMap("#A67B5B", "Cafe au lait"); +CosmicColor.addToMap("#4B3621", "Cafe noir"); +CosmicColor.addToMap("#1E4D2B", "Cal Poly green"); +CosmicColor.addToMap("#A3C1AD", "Cambridge Blue"); +CosmicColor.addToMap("#EFBBCC", "Cameo pink"); +CosmicColor.addToMap("#78866B", "Camouflage green"); +CosmicColor.addToMap("#FFEF00", "Canary yellow"); +CosmicColor.addToMap("#FF0800", "Candy apple red"); +CosmicColor.addToMap("#E4717A", "Candy pink"); +CosmicColor.addToMap("#592720", "Caput mortuum"); +CosmicColor.addToMap("#C41E3A", "Cardinal"); +CosmicColor.addToMap("#00CC99", "Caribbean green"); +CosmicColor.addToMap("#960018", "Carmine"); +CosmicColor.addToMap("#EB4C42", "Carmine pink"); +CosmicColor.addToMap("#FF0038", "Carmine red"); +CosmicColor.addToMap("#FFA6C9", "Carnation pink"); +CosmicColor.addToMap("#99BADD", "Carolina blue"); +CosmicColor.addToMap("#ED9121", "Carrot orange"); +CosmicColor.addToMap("#00563F", "Castleton green"); +CosmicColor.addToMap("#062A78", "Catalina blue"); +CosmicColor.addToMap("#703642", "Catawba"); +CosmicColor.addToMap("#C95A49", "Cedar Chest"); +CosmicColor.addToMap("#92A1CF", "Ceil"); +CosmicColor.addToMap("#ACE1AF", "Celadon"); +CosmicColor.addToMap("#007BA7", "Celadon blue"); +CosmicColor.addToMap("#2F847C", "Celadon green"); +CosmicColor.addToMap("#4997D0", "Celestial blue"); +CosmicColor.addToMap("#EC3B83", "Cerise pink"); +CosmicColor.addToMap("#2A52BE", "Cerulean blue"); +CosmicColor.addToMap("#6D9BC3", "Cerulean frost"); +CosmicColor.addToMap("#007AA5", "CG Blue"); +CosmicColor.addToMap("#E03C31", "CG Red"); +CosmicColor.addToMap("#A0785A", "Chamoisee"); +CosmicColor.addToMap("#F7E7CE", "Champagne"); +CosmicColor.addToMap("#36454F", "Charcoal"); +CosmicColor.addToMap("#232B2B", "Charleston green"); +CosmicColor.addToMap("#E68FAC", "Charm pink"); +CosmicColor.addToMap("#DFFF00", "Chartreuse"); +CosmicColor.addToMap("#7FFF00", "Chartreuse (web)"); +CosmicColor.addToMap("#DE3163", "Cherry"); +CosmicColor.addToMap("#FFB7C5", "Cherry blossom pink"); +CosmicColor.addToMap("#954535", "Chestnut"); +CosmicColor.addToMap("#A8516E", "China rose"); +CosmicColor.addToMap("#AA381E", "Chinese red"); +CosmicColor.addToMap("#856088", "Chinese violet"); +CosmicColor.addToMap("#7B3F00", "Chocolate"); +CosmicColor.addToMap("#FFA700", "Chrome yellow"); +CosmicColor.addToMap("#98817B", "Cinereous"); +CosmicColor.addToMap("#E4D00A", "Citrine"); +CosmicColor.addToMap("#9FA91F", "Citron"); +CosmicColor.addToMap("#7F1734", "Claret"); +CosmicColor.addToMap("#FBCCE7", "Classic rose"); +CosmicColor.addToMap("#0047AB", "Cobalt"); +CosmicColor.addToMap("#D2691E", "Cocoa brown"); +CosmicColor.addToMap("#965A3E", "Coconut"); +CosmicColor.addToMap("#6F4E37", "Coffee Brown"); +CosmicColor.addToMap("#9BDDFF", "Columbia blue"); +CosmicColor.addToMap("#002E63", "Cool black"); +CosmicColor.addToMap("#8C92AC", "Cool grey"); +CosmicColor.addToMap("#B87333", "Copper"); +CosmicColor.addToMap("#AD6F69", "Copper penny"); +CosmicColor.addToMap("#CB6D51", "Copper red"); +CosmicColor.addToMap("#996666", "Copper rose"); +CosmicColor.addToMap("#FF3800", "Coquelicot"); +CosmicColor.addToMap("#FF7F50", "Coral"); +CosmicColor.addToMap("#F88379", "Coral pink"); +CosmicColor.addToMap("#FF4040", "Coral red"); +CosmicColor.addToMap("#893F45", "Cordovan"); +CosmicColor.addToMap("#FBEC5D", "Corn Yellow"); +CosmicColor.addToMap("#B31B1B", "Cornell Red"); +CosmicColor.addToMap("#6495ED", "Cornflower blue"); +CosmicColor.addToMap("#FFF8DC", "Cornsilk"); +CosmicColor.addToMap("#FFF8E7", "Cosmic latte"); +CosmicColor.addToMap("#FFBCD9", "Cotton candy"); +CosmicColor.addToMap("#FFFDD0", "Cream"); +CosmicColor.addToMap("#DC143C", "Crimson"); +CosmicColor.addToMap("#BE0032", "Crimson glory"); +CosmicColor.addToMap("#00B7EB", "Cyan"); +CosmicColor.addToMap("#58427C", "Cyber grape"); +CosmicColor.addToMap("#FFD300", "Cyber yellow"); +CosmicColor.addToMap("#FFFF31", "Daffodil"); +CosmicColor.addToMap("#F0E130", "Dandelion"); +CosmicColor.addToMap("#00008B", "Dark blue"); +CosmicColor.addToMap("#666699", "Dark blue-gray"); +CosmicColor.addToMap("#654321", "Dark brown"); +CosmicColor.addToMap("#5D3954", "Dark byzantium"); +CosmicColor.addToMap("#A40000", "Dark candy apple red"); +CosmicColor.addToMap("#08457E", "Dark cerulean"); +CosmicColor.addToMap("#986960", "Dark chestnut"); +CosmicColor.addToMap("#CD5B45", "Dark coral"); +CosmicColor.addToMap("#008B8B", "Dark cyan"); +CosmicColor.addToMap("#536878", "Dark electric blue"); +CosmicColor.addToMap("#B8860B", "Dark goldenrod"); +CosmicColor.addToMap("#A9A9A9", "Dark gray"); +CosmicColor.addToMap("#013220", "Dark green"); +CosmicColor.addToMap("#00416A", "Dark imperial blue"); +CosmicColor.addToMap("#1A2421", "Dark jungle green"); +CosmicColor.addToMap("#BDB76B", "Dark khaki"); +CosmicColor.addToMap("#734F96", "Dark lavender"); +CosmicColor.addToMap("#534B4F", "Dark liver"); +CosmicColor.addToMap("#543D37", "Dark liver (horses)"); +CosmicColor.addToMap("#8B008B", "Dark magenta"); +CosmicColor.addToMap("#003366", "Dark midnight blue"); +CosmicColor.addToMap("#4A5D23", "Dark moss green"); +CosmicColor.addToMap("#556B2F", "Dark olive green"); +CosmicColor.addToMap("#FF8C00", "Dark orange"); +CosmicColor.addToMap("#9932CC", "Dark orchid"); +CosmicColor.addToMap("#779ECB", "Dark pastel blue"); +CosmicColor.addToMap("#03C03C", "Dark pastel green"); +CosmicColor.addToMap("#966FD6", "Dark pastel purple"); +CosmicColor.addToMap("#C23B22", "Dark pastel red"); +CosmicColor.addToMap("#E75480", "Dark pink"); +CosmicColor.addToMap("#003399", "Dark powder blue"); +CosmicColor.addToMap("#4F3A3C", "Dark puce"); +CosmicColor.addToMap("#872657", "Dark raspberry"); +CosmicColor.addToMap("#8B0000", "Dark red"); +CosmicColor.addToMap("#E9967A", "Dark salmon"); +CosmicColor.addToMap("#560319", "Dark scarlet"); +CosmicColor.addToMap("#8FBC8F", "Dark sea green"); +CosmicColor.addToMap("#3C1414", "Dark sienna"); +CosmicColor.addToMap("#8CBED6", "Dark sky blue"); +CosmicColor.addToMap("#483D8B", "Dark slate blue"); +CosmicColor.addToMap("#2F4F4F", "Dark slate gray"); +CosmicColor.addToMap("#177245", "Dark spring green"); +CosmicColor.addToMap("#918151", "Dark tan"); +CosmicColor.addToMap("#FFA812", "Dark tangerine"); +CosmicColor.addToMap("#CC4E5C", "Dark terra cotta"); +CosmicColor.addToMap("#00CED1", "Dark turquoise"); +CosmicColor.addToMap("#D1BEA8", "Dark vanilla"); +CosmicColor.addToMap("#9400D3", "Dark violet"); +CosmicColor.addToMap("#9B870C", "Dark yellow"); +CosmicColor.addToMap("#00703C", "Dartmouth green"); +CosmicColor.addToMap("#555555", "Davy's grey"); +CosmicColor.addToMap("#D70A53", "Debian red"); +CosmicColor.addToMap("#A9203E", "Deep carmine"); +CosmicColor.addToMap("#EF3038", "Deep carmine pink"); +CosmicColor.addToMap("#E9692C", "Deep carrot orange"); +CosmicColor.addToMap("#DA3287", "Deep cerise"); +CosmicColor.addToMap("#B94E48", "Deep chestnut"); +CosmicColor.addToMap("#C154C1", "Deep fuchsia"); +CosmicColor.addToMap("#004B49", "Deep jungle green"); +CosmicColor.addToMap("#F5C71A", "Deep lemon"); +CosmicColor.addToMap("#9955BB", "Deep lilac"); +CosmicColor.addToMap("#CC00CC", "Deep magenta"); +CosmicColor.addToMap("#D473D4", "Deep mauve"); +CosmicColor.addToMap("#355E3B", "Deep moss green"); +CosmicColor.addToMap("#FFCBA4", "Deep peach"); +CosmicColor.addToMap("#A95C68", "Deep puce"); +CosmicColor.addToMap("#843F5B", "Deep ruby"); +CosmicColor.addToMap("#FF9933", "Deep saffron"); +CosmicColor.addToMap("#00BFFF", "Deep sky blue"); +CosmicColor.addToMap("#4A646C", "Deep Space Sparkle"); +CosmicColor.addToMap("#7E5E60", "Deep Taupe"); +CosmicColor.addToMap("#66424D", "Deep Tuscan red"); +CosmicColor.addToMap("#BA8759", "Deer"); +CosmicColor.addToMap("#1560BD", "Denim"); +CosmicColor.addToMap("#EDC9AF", "Desert sand"); +CosmicColor.addToMap("#EA3C53", "Desire"); +CosmicColor.addToMap("#B9F2FF", "Diamond"); +CosmicColor.addToMap("#696969", "Dim gray"); +CosmicColor.addToMap("#9B7653", "Dirt"); +CosmicColor.addToMap("#1E90FF", "Dodger blue"); +CosmicColor.addToMap("#D71868", "Dogwood rose"); +CosmicColor.addToMap("#85BB65", "Dollar bill"); +CosmicColor.addToMap("#664C28", "Donkey Brown"); +CosmicColor.addToMap("#00009C", "Duke blue"); +CosmicColor.addToMap("#E5CCC9", "Dust storm"); +CosmicColor.addToMap("#EFDFBB", "Dutch white"); +CosmicColor.addToMap("#E1A95F", "Earth yellow"); +CosmicColor.addToMap("#555D50", "Ebony"); +CosmicColor.addToMap("#1B1B1B", "Eerie black"); +CosmicColor.addToMap("#614051", "Eggplant"); +CosmicColor.addToMap("#F0EAD6", "Eggshell"); +CosmicColor.addToMap("#1034A6", "Egyptian blue"); +CosmicColor.addToMap("#7DF9FF", "Electric blue"); +CosmicColor.addToMap("#FF003F", "Electric crimson"); +CosmicColor.addToMap("#00FF00", "Electric green"); +CosmicColor.addToMap("#6F00FF", "Electric indigo"); +CosmicColor.addToMap("#CCFF00", "Electric lime"); +CosmicColor.addToMap("#BF00FF", "Electric purple"); +CosmicColor.addToMap("#3F00FF", "Electric ultramarine"); +CosmicColor.addToMap("#FFFF00", "Electric yellow"); +CosmicColor.addToMap("#50C878", "Emerald"); +CosmicColor.addToMap("#6C3082", "Eminence"); +CosmicColor.addToMap("#1B4D3E", "English green"); +CosmicColor.addToMap("#B48395", "English lavender"); +CosmicColor.addToMap("#AB4B52", "English red"); +CosmicColor.addToMap("#563C5C", "English violet"); +CosmicColor.addToMap("#96C8A2", "Eton blue"); +CosmicColor.addToMap("#44D7A8", "Eucalyptus"); +CosmicColor.addToMap("#801818", "Falu red"); +CosmicColor.addToMap("#B53389", "Fandango"); +CosmicColor.addToMap("#DE5285", "Fandango pink"); +CosmicColor.addToMap("#F400A1", "Fashion fuchsia"); +CosmicColor.addToMap("#E5AA70", "Fawn"); +CosmicColor.addToMap("#4D5D53", "Feldgrau"); +CosmicColor.addToMap("#4F7942", "Fern green"); +CosmicColor.addToMap("#FF2800", "Ferrari Red"); +CosmicColor.addToMap("#6C541E", "Field drab"); +CosmicColor.addToMap("#B22222", "Firebrick"); +CosmicColor.addToMap("#CE2029", "Fire engine red"); +CosmicColor.addToMap("#E25822", "Flame"); +CosmicColor.addToMap("#FC8EAC", "Flamingo pink"); +CosmicColor.addToMap("#F7E98E", "Flavescent"); +CosmicColor.addToMap("#EEDC82", "Flax"); +CosmicColor.addToMap("#A2006D", "Flirt"); +CosmicColor.addToMap("#FFFAF0", "Floral white"); +CosmicColor.addToMap("#FFBF00", "Fluorescent orange"); +CosmicColor.addToMap("#FF1493", "Fluorescent pink"); +CosmicColor.addToMap("#FF004F", "Folly"); +CosmicColor.addToMap("#014421", "Forest green"); +CosmicColor.addToMap("#228B22", "Forest green (web)"); +CosmicColor.addToMap("#856D4D", "French bistre"); +CosmicColor.addToMap("#0072BB", "French blue"); +CosmicColor.addToMap("#FD3F92", "French fuchsia"); +CosmicColor.addToMap("#86608E", "French lilac"); +CosmicColor.addToMap("#9EFD38", "French lime"); +CosmicColor.addToMap("#FD6C9E", "French pink"); +CosmicColor.addToMap("#4E1609", "French puce"); +CosmicColor.addToMap("#C72C48", "French raspberry"); +CosmicColor.addToMap("#F64A8A", "French rose"); +CosmicColor.addToMap("#77B5FE", "French sky blue"); +CosmicColor.addToMap("#8806CE", "French violet"); +CosmicColor.addToMap("#AC1E44", "French wine"); +CosmicColor.addToMap("#A6E7FF", "Fresh Air"); +CosmicColor.addToMap("#FF77FF", "Fuchsia pink"); +CosmicColor.addToMap("#CC397B", "Fuchsia purple"); +CosmicColor.addToMap("#C74375", "Fuchsia rose"); +CosmicColor.addToMap("#E48400", "Fulvous"); +CosmicColor.addToMap("#CC6666", "Fuzzy Wuzzy"); +CosmicColor.addToMap("#DCDCDC", "Gainsboro"); +CosmicColor.addToMap("#E49B0F", "Gamboge"); +CosmicColor.addToMap("#007F66", "Generic viridian"); +CosmicColor.addToMap("#F8F8FF", "Ghost white"); +CosmicColor.addToMap("#FE5A1D", "Giants orange"); +CosmicColor.addToMap("#B06500", "Ginger"); +CosmicColor.addToMap("#6082B6", "Glaucous"); +CosmicColor.addToMap("#E6E8FA", "Glitter"); +CosmicColor.addToMap("#00AB66", "GO green"); +CosmicColor.addToMap("#D4AF37", "Gold (metallic)"); +CosmicColor.addToMap("#FFD700", "Gold (web) (Golden)"); +CosmicColor.addToMap("#85754E", "Gold Fusion"); +CosmicColor.addToMap("#996515", "Golden brown"); +CosmicColor.addToMap("#FCC200", "Golden poppy"); +CosmicColor.addToMap("#FFDF00", "Golden yellow"); +CosmicColor.addToMap("#DAA520", "Goldenrod"); +CosmicColor.addToMap("#A8E4A0", "Granny Smith Apple"); +CosmicColor.addToMap("#6F2DA8", "Grape"); +CosmicColor.addToMap("#808080", "Gray"); +CosmicColor.addToMap("#BEBEBE", "Gray (X11 gray)"); +CosmicColor.addToMap("#465945", "Gray-asparagus"); +CosmicColor.addToMap("#1CAC78", "Green (Crayola)"); +CosmicColor.addToMap("#008000", "Green"); +CosmicColor.addToMap("#00A877", "Green (Munsell)"); +CosmicColor.addToMap("#009F6B", "Green (NCS)"); +CosmicColor.addToMap("#00A550", "Green (pigment)"); +CosmicColor.addToMap("#66B032", "Green (RYB)"); +CosmicColor.addToMap("#ADFF2F", "Green-yellow"); +CosmicColor.addToMap("#A99A86", "Grullo"); +CosmicColor.addToMap("#663854", "Halaya ube"); +CosmicColor.addToMap("#446CCF", "Han blue"); +CosmicColor.addToMap("#5218FA", "Han purple"); +CosmicColor.addToMap("#E9D66B", "Hansa yellow"); +CosmicColor.addToMap("#3FFF00", "Harlequin"); +CosmicColor.addToMap("#C90016", "Harvard crimson"); +CosmicColor.addToMap("#DA9100", "Harvest gold"); +CosmicColor.addToMap("#DF73FF", "Heliotrope"); +CosmicColor.addToMap("#AA98A9", "Heliotrope gray"); +CosmicColor.addToMap("#F0FFF0", "Honeydew"); +CosmicColor.addToMap("#006DB0", "Honolulu blue"); +CosmicColor.addToMap("#49796B", "Hooker's green"); +CosmicColor.addToMap("#FF1DCE", "Hot magenta"); +CosmicColor.addToMap("#FF69B4", "Hot pink"); +CosmicColor.addToMap("#71A6D2", "Iceberg"); +CosmicColor.addToMap("#FCF75E", "Icterine"); +CosmicColor.addToMap("#319177", "Illuminating Emerald"); +CosmicColor.addToMap("#602F6B", "Imperial"); +CosmicColor.addToMap("#002395", "Imperial blue"); +CosmicColor.addToMap("#66023C", "Imperial purple"); +CosmicColor.addToMap("#ED2939", "Imperial red"); +CosmicColor.addToMap("#B2EC5D", "Inchworm"); +CosmicColor.addToMap("#4C516D", "Independence"); +CosmicColor.addToMap("#138808", "India green"); +CosmicColor.addToMap("#CD5C5C", "Indian red"); +CosmicColor.addToMap("#E3A857", "Indian yellow"); +CosmicColor.addToMap("#4B0082", "Indigo"); +CosmicColor.addToMap("#002FA7", "International Klein Blue"); +CosmicColor.addToMap("#FF4F00", "International orange (aerospace)"); +CosmicColor.addToMap("#BA160C", "International orange (engineering)"); +CosmicColor.addToMap("#C0362C", "International orange (Golden Gate Bridge)"); +CosmicColor.addToMap("#5A4FCF", "Iris"); +CosmicColor.addToMap("#F4F0EC", "Isabelline"); +CosmicColor.addToMap("#009000", "Islamic green"); +CosmicColor.addToMap("#B2FFFF", "Italian sky blue"); +CosmicColor.addToMap("#FFFFF0", "Ivory"); +CosmicColor.addToMap("#00A86B", "Jade"); +CosmicColor.addToMap("#9D2933", "Japanese carmine"); +CosmicColor.addToMap("#264348", "Japanese indigo"); +CosmicColor.addToMap("#5B3256", "Japanese violet"); +CosmicColor.addToMap("#D73B3E", "Jasper"); +CosmicColor.addToMap("#A50B5E", "Jazzberry jam"); +CosmicColor.addToMap("#DA614E", "Jelly Bean"); +CosmicColor.addToMap("#343434", "Jet"); +CosmicColor.addToMap("#F4CA16", "Jonquil"); +CosmicColor.addToMap("#8AB9F1", "Jordy blue"); +CosmicColor.addToMap("#BDDA57", "June bud"); +CosmicColor.addToMap("#29AB87", "Jungle green"); +CosmicColor.addToMap("#4CBB17", "Kelly green"); +CosmicColor.addToMap("#7C1C05", "Kenyan copper"); +CosmicColor.addToMap("#3AB09E", "Keppel"); +CosmicColor.addToMap("#C3B091", "Khaki"); +CosmicColor.addToMap("#E79FC4", "Kobi"); +CosmicColor.addToMap("#354230", "Kombu green"); +CosmicColor.addToMap("#E8000D", "KU Crimson"); +CosmicColor.addToMap("#087830", "La Salle Green"); +CosmicColor.addToMap("#D6CADD", "Languid lavender"); +CosmicColor.addToMap("#26619C", "Lapis lazuli"); +CosmicColor.addToMap("#A9BA9D", "Laurel green"); +CosmicColor.addToMap("#CF1020", "Lava"); +CosmicColor.addToMap("#B57EDC", "Lavender (floral)"); +CosmicColor.addToMap("#CCCCFF", "Lavender blue"); +CosmicColor.addToMap("#FFF0F5", "Lavender blush"); +CosmicColor.addToMap("#C4C3D0", "Lavender gray"); +CosmicColor.addToMap("#9457EB", "Lavender indigo"); +CosmicColor.addToMap("#EE82EE", "Lavender magenta"); +CosmicColor.addToMap("#E6E6FA", "Lavender mist"); +CosmicColor.addToMap("#FBAED2", "Lavender pink"); +CosmicColor.addToMap("#967BB6", "Lavender purple"); +CosmicColor.addToMap("#FBA0E3", "Lavender rose"); +CosmicColor.addToMap("#7CFC00", "Lawn green"); +CosmicColor.addToMap("#FFF700", "Lemon"); +CosmicColor.addToMap("#FFFACD", "Lemon chiffon"); +CosmicColor.addToMap("#CCA01D", "Lemon curry"); +CosmicColor.addToMap("#FDFF00", "Lemon glacier"); +CosmicColor.addToMap("#E3FF00", "Lemon lime"); +CosmicColor.addToMap("#F6EABE", "Lemon meringue"); +CosmicColor.addToMap("#FFF44F", "Lemon yellow"); +CosmicColor.addToMap("#1A1110", "Licorice"); +CosmicColor.addToMap("#545AA7", "Liberty"); +CosmicColor.addToMap("#FDD5B1", "Light apricot"); +CosmicColor.addToMap("#ADD8E6", "Light blue"); +CosmicColor.addToMap("#B5651D", "Light brown"); +CosmicColor.addToMap("#E66771", "Light carmine pink"); +CosmicColor.addToMap("#F08080", "Light coral"); +CosmicColor.addToMap("#93CCEA", "Light cornflower blue"); +CosmicColor.addToMap("#F56991", "Light crimson"); +CosmicColor.addToMap("#E0FFFF", "Light cyan"); +CosmicColor.addToMap("#FF5CCD", "Light deep pink"); +CosmicColor.addToMap("#C8AD7F", "Light French beige"); +CosmicColor.addToMap("#F984EF", "Light fuchsia pink"); +CosmicColor.addToMap("#FAFAD2", "Light goldenrod yellow"); +CosmicColor.addToMap("#D3D3D3", "Light gray"); +CosmicColor.addToMap("#90EE90", "Light green"); +CosmicColor.addToMap("#FFB3DE", "Light hot pink"); +CosmicColor.addToMap("#F0E68C", "Light khaki"); +CosmicColor.addToMap("#D39BCB", "Light medium orchid"); +CosmicColor.addToMap("#ADDFAD", "Light moss green"); +CosmicColor.addToMap("#E6A8D7", "Light orchid"); +CosmicColor.addToMap("#B19CD9", "Light pastel purple"); +CosmicColor.addToMap("#FFB6C1", "Light pink"); +CosmicColor.addToMap("#E97451", "Light red ochre"); +CosmicColor.addToMap("#FFA07A", "Light salmon"); +CosmicColor.addToMap("#FF9999", "Light salmon pink"); +CosmicColor.addToMap("#20B2AA", "Light sea green"); +CosmicColor.addToMap("#87CEFA", "Light sky blue"); +CosmicColor.addToMap("#778899", "Light slate gray"); +CosmicColor.addToMap("#B0C4DE", "Light steel blue"); +CosmicColor.addToMap("#B38B6D", "Light taupe"); +CosmicColor.addToMap("#FFFFE0", "Light yellow"); +CosmicColor.addToMap("#C8A2C8", "Lilac"); +CosmicColor.addToMap("#BFFF00", "Lime"); +CosmicColor.addToMap("#32CD32", "Lime green"); +CosmicColor.addToMap("#9DC209", "Limerick"); +CosmicColor.addToMap("#195905", "Lincoln green"); +CosmicColor.addToMap("#FAF0E6", "Linen"); +CosmicColor.addToMap("#6CA0DC", "Little boy blue"); +CosmicColor.addToMap("#B86D29", "Liver (dogs)"); +CosmicColor.addToMap("#6C2E1F", "Liver"); +CosmicColor.addToMap("#987456", "Liver chestnut"); +CosmicColor.addToMap("#FFE4CD", "Lumber"); +CosmicColor.addToMap("#E62020", "Lust"); +CosmicColor.addToMap("#FF00FF", "Magenta"); +CosmicColor.addToMap("#CA1F7B", "Magenta (dye)"); +CosmicColor.addToMap("#D0417E", "Magenta (Pantone)"); +CosmicColor.addToMap("#FF0090", "Magenta (process)"); +CosmicColor.addToMap("#9F4576", "Magenta haze"); +CosmicColor.addToMap("#AAF0D1", "Magic mint"); +CosmicColor.addToMap("#F8F4FF", "Magnolia"); +CosmicColor.addToMap("#C04000", "Mahogany"); +CosmicColor.addToMap("#6050DC", "Majorelle Blue"); +CosmicColor.addToMap("#0BDA51", "Malachite"); +CosmicColor.addToMap("#979AAA", "Manatee"); +CosmicColor.addToMap("#FF8243", "Mango Tango"); +CosmicColor.addToMap("#74C365", "Mantis"); +CosmicColor.addToMap("#880085", "Mardi Gras"); +CosmicColor.addToMap("#800000", "Maroon"); +CosmicColor.addToMap("#E0B0FF", "Mauve"); +CosmicColor.addToMap("#915F6D", "Mauve taupe"); +CosmicColor.addToMap("#EF98AA", "Mauvelous"); +CosmicColor.addToMap("#4C9141", "May green"); +CosmicColor.addToMap("#73C2FB", "Maya blue"); +CosmicColor.addToMap("#E5B73B", "Meat brown"); +CosmicColor.addToMap("#66DDAA", "Medium aquamarine"); +CosmicColor.addToMap("#0000CD", "Medium blue"); +CosmicColor.addToMap("#E2062C", "Medium candy apple red"); +CosmicColor.addToMap("#AF4035", "Medium carmine"); +CosmicColor.addToMap("#035096", "Medium electric blue"); +CosmicColor.addToMap("#1C352D", "Medium jungle green"); +CosmicColor.addToMap("#BA55D3", "Medium orchid"); +CosmicColor.addToMap("#9370DB", "Medium purple"); +CosmicColor.addToMap("#BB3385", "Medium red-violet"); +CosmicColor.addToMap("#AA4069", "Medium ruby"); +CosmicColor.addToMap("#3CB371", "Medium sea green"); +CosmicColor.addToMap("#80DAEB", "Medium sky blue"); +CosmicColor.addToMap("#7B68EE", "Medium slate blue"); +CosmicColor.addToMap("#C9DC87", "Medium spring bud"); +CosmicColor.addToMap("#00FA9A", "Medium spring green"); +CosmicColor.addToMap("#674C47", "Medium taupe"); +CosmicColor.addToMap("#48D1CC", "Medium turquoise"); +CosmicColor.addToMap("#D9603B", "Pale vermilion"); +CosmicColor.addToMap("#F8B878", "Mellow apricot"); +CosmicColor.addToMap("#F8DE7E", "Mellow yellow"); +CosmicColor.addToMap("#FDBCB4", "Melon"); +CosmicColor.addToMap("#0A7E8C", "Metallic Seaweed"); +CosmicColor.addToMap("#9C7C38", "Metallic Sunburst"); +CosmicColor.addToMap("#E4007C", "Mexican pink"); +CosmicColor.addToMap("#191970", "Midnight blue"); +CosmicColor.addToMap("#004953", "Midnight green (eagle green)"); +CosmicColor.addToMap("#FFC40C", "Mikado yellow"); +CosmicColor.addToMap("#E3F988", "Mindaro"); +CosmicColor.addToMap("#3EB489", "Mint"); +CosmicColor.addToMap("#F5FFFA", "Mint cream"); +CosmicColor.addToMap("#98FF98", "Mint green"); +CosmicColor.addToMap("#FFE4E1", "Misty rose"); +CosmicColor.addToMap("#73A9C2", "Moonstone blue"); +CosmicColor.addToMap("#AE0C00", "Mordant red 19"); +CosmicColor.addToMap("#8A9A5B", "Moss green"); +CosmicColor.addToMap("#30BA8F", "Mountain Meadow"); +CosmicColor.addToMap("#997A8D", "Mountbatten pink"); +CosmicColor.addToMap("#18453B", "MSU Green"); +CosmicColor.addToMap("#306030", "Mughal green"); +CosmicColor.addToMap("#C54B8C", "Mulberry"); +CosmicColor.addToMap("#FFDB58", "Mustard"); +CosmicColor.addToMap("#317873", "Myrtle green"); +CosmicColor.addToMap("#F6ADC6", "Nadeshiko pink"); +CosmicColor.addToMap("#2A8000", "Napier green"); +CosmicColor.addToMap("#FFDEAD", "Navajo white"); +CosmicColor.addToMap("#000080", "Navy"); +CosmicColor.addToMap("#FFA343", "Neon Carrot"); +CosmicColor.addToMap("#FE4164", "Neon fuchsia"); +CosmicColor.addToMap("#39FF14", "Neon green"); +CosmicColor.addToMap("#214FC6", "New Car"); +CosmicColor.addToMap("#D7837F", "New York pink"); +CosmicColor.addToMap("#A4DDED", "Non-photo blue"); +CosmicColor.addToMap("#059033", "North Texas Green"); +CosmicColor.addToMap("#E9FFDB", "Nyanza"); +CosmicColor.addToMap("#0077BE", "Ocean Boat Blue"); +CosmicColor.addToMap("#CC7722", "Ochre"); +CosmicColor.addToMap("#43302E", "Old burgundy"); +CosmicColor.addToMap("#CFB53B", "Old gold"); +CosmicColor.addToMap("#FDF5E6", "Old lace"); +CosmicColor.addToMap("#796878", "Old lavender"); +CosmicColor.addToMap("#673147", "Old mauve"); +CosmicColor.addToMap("#867E36", "Old moss green"); +CosmicColor.addToMap("#C08081", "Old rose"); +CosmicColor.addToMap("#808000", "Olive"); +CosmicColor.addToMap("#6B8E23", "Olive Drab #3"); +CosmicColor.addToMap("#3C341F", "Olive Drab #7"); +CosmicColor.addToMap("#9AB973", "Olivine"); +CosmicColor.addToMap("#353839", "Onyx"); +CosmicColor.addToMap("#B784A7", "Opera mauve"); +CosmicColor.addToMap("#FF7F00", "Orange"); +CosmicColor.addToMap("#FF7538", "Orange (Crayola)"); +CosmicColor.addToMap("#FF5800", "Orange (Pantone)"); +CosmicColor.addToMap("#FB9902", "Orange (RYB)"); +CosmicColor.addToMap("#FFA500", "Orange (web)"); +CosmicColor.addToMap("#FF9F00", "Orange peel"); +CosmicColor.addToMap("#FF4500", "Orange-red"); +CosmicColor.addToMap("#DA70D6", "Orchid"); +CosmicColor.addToMap("#F2BDCD", "Orchid pink"); +CosmicColor.addToMap("#FB4F14", "Orioles orange"); +CosmicColor.addToMap("#414A4C", "Outer Space"); +CosmicColor.addToMap("#FF6E4A", "Outrageous Orange"); +CosmicColor.addToMap("#002147", "Oxford Blue"); +CosmicColor.addToMap("#990000", "Crimson Red"); +CosmicColor.addToMap("#006600", "Pakistan green"); +CosmicColor.addToMap("#273BE2", "Palatinate blue"); +CosmicColor.addToMap("#682860", "Palatinate purple"); +CosmicColor.addToMap("#BCD4E6", "Pale aqua"); +CosmicColor.addToMap("#AFEEEE", "Pale blue"); +CosmicColor.addToMap("#987654", "Pale brown"); +CosmicColor.addToMap("#9BC4E2", "Pale cerulean"); +CosmicColor.addToMap("#DDADAF", "Pale chestnut"); +CosmicColor.addToMap("#DA8A67", "Pale copper"); +CosmicColor.addToMap("#ABCDEF", "Pale cornflower blue"); +CosmicColor.addToMap("#E6BE8A", "Pale gold"); +CosmicColor.addToMap("#EEE8AA", "Pale goldenrod"); +CosmicColor.addToMap("#98FB98", "Pale green"); +CosmicColor.addToMap("#DCD0FF", "Pale lavender"); +CosmicColor.addToMap("#F984E5", "Pale magenta"); +CosmicColor.addToMap("#FADADD", "Pale pink"); +CosmicColor.addToMap("#DDA0DD", "Pale plum"); +CosmicColor.addToMap("#DB7093", "Pale red-violet"); +CosmicColor.addToMap("#96DED1", "Pale robin egg blue"); +CosmicColor.addToMap("#C9C0BB", "Pale silver"); +CosmicColor.addToMap("#ECEBBD", "Pale spring bud"); +CosmicColor.addToMap("#BC987E", "Pale taupe"); +CosmicColor.addToMap("#78184A", "Pansy purple"); +CosmicColor.addToMap("#009B7D", "Paolo Veronese green"); +CosmicColor.addToMap("#FFEFD5", "Papaya whip"); +CosmicColor.addToMap("#E63E62", "Paradise pink"); +CosmicColor.addToMap("#AEC6CF", "Pastel blue"); +CosmicColor.addToMap("#836953", "Pastel brown"); +CosmicColor.addToMap("#CFCFC4", "Pastel gray"); +CosmicColor.addToMap("#77DD77", "Pastel green"); +CosmicColor.addToMap("#F49AC2", "Pastel magenta"); +CosmicColor.addToMap("#FFB347", "Pastel orange"); +CosmicColor.addToMap("#DEA5A4", "Pastel pink"); +CosmicColor.addToMap("#B39EB5", "Pastel purple"); +CosmicColor.addToMap("#FF6961", "Pastel red"); +CosmicColor.addToMap("#CB99C9", "Pastel violet"); +CosmicColor.addToMap("#FDFD96", "Pastel yellow"); +CosmicColor.addToMap("#FFE5B4", "Peach"); +CosmicColor.addToMap("#FFCC99", "Peach-orange"); +CosmicColor.addToMap("#FFDAB9", "Peach puff"); +CosmicColor.addToMap("#FADFAD", "Peach-yellow"); +CosmicColor.addToMap("#D1E231", "Pear"); +CosmicColor.addToMap("#EAE0C8", "Pearl"); +CosmicColor.addToMap("#88D8C0", "Pearl Aqua"); +CosmicColor.addToMap("#B768A2", "Pearly purple"); +CosmicColor.addToMap("#E6E200", "Peridot"); +CosmicColor.addToMap("#1C39BB", "Persian blue"); +CosmicColor.addToMap("#00A693", "Persian green"); +CosmicColor.addToMap("#32127A", "Persian indigo"); +CosmicColor.addToMap("#D99058", "Persian orange"); +CosmicColor.addToMap("#F77FBE", "Persian pink"); +CosmicColor.addToMap("#701C1C", "Persian plum"); +CosmicColor.addToMap("#CC3333", "Persian red"); +CosmicColor.addToMap("#FE28A2", "Persian rose"); +CosmicColor.addToMap("#EC5800", "Persimmon"); +CosmicColor.addToMap("#CD853F", "Peru"); +CosmicColor.addToMap("#000F89", "Phthalo blue"); +CosmicColor.addToMap("#123524", "Phthalo green"); +CosmicColor.addToMap("#45B1E8", "Picton blue"); +CosmicColor.addToMap("#C30B4E", "Pictorial carmine"); +CosmicColor.addToMap("#FDDDE6", "Piggy pink"); +CosmicColor.addToMap("#01796F", "Pine green"); +CosmicColor.addToMap("#FFC0CB", "Pink"); +CosmicColor.addToMap("#D74894", "Pink (Pantone)"); +CosmicColor.addToMap("#FFDDF4", "Pink lace"); +CosmicColor.addToMap("#D8B2D1", "Pink lavender"); +CosmicColor.addToMap("#FF9966", "Pink-orange"); +CosmicColor.addToMap("#E7ACCF", "Pink pearl"); +CosmicColor.addToMap("#F78FA7", "Pink Sherbet"); +CosmicColor.addToMap("#93C572", "Pistachio"); +CosmicColor.addToMap("#E5E4E2", "Platinum"); +CosmicColor.addToMap("#8E4585", "Plum"); +CosmicColor.addToMap("#BE4F62", "Popstar"); +CosmicColor.addToMap("#FF5A36", "Portland Orange"); +CosmicColor.addToMap("#B0E0E6", "Powder blue"); +CosmicColor.addToMap("#FF8F00", "Princeton orange"); +CosmicColor.addToMap("#003153", "Prussian blue"); +CosmicColor.addToMap("#DF00FF", "Psychedelic purple"); +CosmicColor.addToMap("#CC8899", "Puce"); +CosmicColor.addToMap("#644117", "Pullman Brown (UPS Brown)"); +CosmicColor.addToMap("#FF7518", "Pumpkin"); +CosmicColor.addToMap("#800080", "Deep purple"); +CosmicColor.addToMap("#9F00C5", "Purple (Munsell)"); +CosmicColor.addToMap("#A020F0", "Purple"); +CosmicColor.addToMap("#69359C", "Purple Heart"); +CosmicColor.addToMap("#9678B6", "Purple mountain majesty"); +CosmicColor.addToMap("#4E5180", "Purple navy"); +CosmicColor.addToMap("#FE4EDA", "Purple pizzazz"); +CosmicColor.addToMap("#50404D", "Purple taupe"); +CosmicColor.addToMap("#9A4EAE", "Purpureus"); +CosmicColor.addToMap("#51484F", "Quartz"); +CosmicColor.addToMap("#436B95", "Queen blue"); +CosmicColor.addToMap("#E8CCD7", "Queen pink"); +CosmicColor.addToMap("#8E3A59", "Quinacridone magenta"); +CosmicColor.addToMap("#FF355E", "Radical Red"); +CosmicColor.addToMap("#FBAB60", "Rajah"); +CosmicColor.addToMap("#E30B5D", "Raspberry"); +CosmicColor.addToMap("#E25098", "Raspberry pink"); +CosmicColor.addToMap("#B3446C", "Raspberry rose"); +CosmicColor.addToMap("#826644", "Raw umber"); +CosmicColor.addToMap("#FF33CC", "Razzle dazzle rose"); +CosmicColor.addToMap("#E3256B", "Razzmatazz"); +CosmicColor.addToMap("#8D4E85", "Razzmic Berry"); +CosmicColor.addToMap("#FF0000", "Red"); +CosmicColor.addToMap("#EE204D", "Red (Crayola)"); +CosmicColor.addToMap("#F2003C", "Red (Munsell)"); +CosmicColor.addToMap("#C40233", "Red (NCS)"); +CosmicColor.addToMap("#ED1C24", "Red (pigment)"); +CosmicColor.addToMap("#FE2712", "Red (RYB)"); +CosmicColor.addToMap("#A52A2A", "Red-brown"); +CosmicColor.addToMap("#860111", "Red devil"); +CosmicColor.addToMap("#FF5349", "Red-orange"); +CosmicColor.addToMap("#E40078", "Red-purple"); +CosmicColor.addToMap("#C71585", "Red-violet"); +CosmicColor.addToMap("#A45A52", "Redwood"); +CosmicColor.addToMap("#522D80", "Regalia"); +CosmicColor.addToMap("#002387", "Resolution blue"); +CosmicColor.addToMap("#777696", "Rhythm"); +CosmicColor.addToMap("#004040", "Rich black"); +CosmicColor.addToMap("#F1A7FE", "Rich brilliant lavender"); +CosmicColor.addToMap("#D70040", "Rich carmine"); +CosmicColor.addToMap("#0892D0", "Rich electric blue"); +CosmicColor.addToMap("#A76BCF", "Rich lavender"); +CosmicColor.addToMap("#B666D2", "Rich lilac"); +CosmicColor.addToMap("#B03060", "Rich maroon"); +CosmicColor.addToMap("#444C38", "Rifle green"); +CosmicColor.addToMap("#704241", "Deep Roast coffee"); +CosmicColor.addToMap("#00CCCC", "Robin egg blue"); +CosmicColor.addToMap("#8A7F80", "Rocket metallic"); +CosmicColor.addToMap("#838996", "Roman silver"); +CosmicColor.addToMap("#F9429E", "Rose bonbon"); +CosmicColor.addToMap("#674846", "Rose ebony"); +CosmicColor.addToMap("#B76E79", "Rose gold"); +CosmicColor.addToMap("#FF66CC", "Rose pink"); +CosmicColor.addToMap("#C21E56", "Rose red"); +CosmicColor.addToMap("#905D5D", "Rose taupe"); +CosmicColor.addToMap("#AB4E52", "Rose vale"); +CosmicColor.addToMap("#65000B", "Rosewood"); +CosmicColor.addToMap("#D40000", "Rosso corsa"); +CosmicColor.addToMap("#BC8F8F", "Rosy brown"); +CosmicColor.addToMap("#0038A8", "Royal azure"); +CosmicColor.addToMap("#002366", "Royal blue"); +CosmicColor.addToMap("#4169E1", "Royal light blue"); +CosmicColor.addToMap("#CA2C92", "Royal fuchsia"); +CosmicColor.addToMap("#7851A9", "Royal purple"); +CosmicColor.addToMap("#FADA5E", "Royal yellow"); +CosmicColor.addToMap("#CE4676", "Ruber"); +CosmicColor.addToMap("#D10056", "Rubine red"); +CosmicColor.addToMap("#E0115F", "Ruby"); +CosmicColor.addToMap("#9B111E", "Ruby red"); +CosmicColor.addToMap("#FF0028", "Ruddy"); +CosmicColor.addToMap("#BB6528", "Ruddy brown"); +CosmicColor.addToMap("#E18E96", "Ruddy pink"); +CosmicColor.addToMap("#A81C07", "Rufous"); +CosmicColor.addToMap("#80461B", "Russet"); +CosmicColor.addToMap("#679267", "Russian green"); +CosmicColor.addToMap("#32174D", "Russian violet"); +CosmicColor.addToMap("#B7410E", "Rust"); +CosmicColor.addToMap("#DA2C43", "Rusty red"); +CosmicColor.addToMap("#8B4513", "Saddle brown"); +CosmicColor.addToMap("#FF6700", "Safety orange (blaze orange)"); +CosmicColor.addToMap("#EED202", "Safety yellow"); +CosmicColor.addToMap("#F4C430", "Saffron"); +CosmicColor.addToMap("#BCB88A", "Sage"); +CosmicColor.addToMap("#23297A", "St. Patrick's blue"); +CosmicColor.addToMap("#FA8072", "Salmon"); +CosmicColor.addToMap("#FF91A4", "Salmon pink"); +CosmicColor.addToMap("#C2B280", "Sand"); +CosmicColor.addToMap("#ECD540", "Sandstorm"); +CosmicColor.addToMap("#F4A460", "Sandy brown"); +CosmicColor.addToMap("#92000A", "Sangria"); +CosmicColor.addToMap("#507D2A", "Sap green"); +CosmicColor.addToMap("#0F52BA", "Sapphire"); +CosmicColor.addToMap("#0067A5", "Sapphire blue"); +CosmicColor.addToMap("#CBA135", "Satin sheen gold"); +CosmicColor.addToMap("#FF2400", "Scarlet"); +CosmicColor.addToMap("#FFD800", "School bus yellow"); +CosmicColor.addToMap("#76FF7A", "Screamin' Green"); +CosmicColor.addToMap("#006994", "Sea blue"); +CosmicColor.addToMap("#2E8B57", "Sea green"); +CosmicColor.addToMap("#321414", "Seal brown"); +CosmicColor.addToMap("#FFF5EE", "Seashell"); +CosmicColor.addToMap("#FFBA00", "Selective yellow"); +CosmicColor.addToMap("#704214", "Sepia"); +CosmicColor.addToMap("#8A795D", "Shadow"); +CosmicColor.addToMap("#778BA5", "Shadow blue"); +CosmicColor.addToMap("#FFCFF1", "Shampoo"); +CosmicColor.addToMap("#009E60", "Shamrock green"); +CosmicColor.addToMap("#8FD400", "Sheen Green"); +CosmicColor.addToMap("#D98695", "Shimmering Blush"); +CosmicColor.addToMap("#FC0FC0", "Shocking pink"); +CosmicColor.addToMap("#882D17", "Sienna"); +CosmicColor.addToMap("#C0C0C0", "Silver"); +CosmicColor.addToMap("#ACACAC", "Silver chalice"); +CosmicColor.addToMap("#5D89BA", "Silver Lake blue"); +CosmicColor.addToMap("#C4AEAD", "Silver pink"); +CosmicColor.addToMap("#BFC1C2", "Silver sand"); +CosmicColor.addToMap("#CB410B", "Sinopia"); +CosmicColor.addToMap("#007474", "Skobeloff"); +CosmicColor.addToMap("#87CEEB", "Sky blue"); +CosmicColor.addToMap("#CF71AF", "Sky magenta"); +CosmicColor.addToMap("#6A5ACD", "Slate blue"); +CosmicColor.addToMap("#708090", "Slate gray"); +CosmicColor.addToMap("#C84186", "Smitten"); +CosmicColor.addToMap("#738276", "Smoke"); +CosmicColor.addToMap("#933D41", "Smokey topaz"); +CosmicColor.addToMap("#100C08", "Smoky black"); +CosmicColor.addToMap("#FFFAFA", "Snow"); +CosmicColor.addToMap("#CEC8EF", "Soap"); +CosmicColor.addToMap("#893843", "Solid pink"); +CosmicColor.addToMap("#757575", "Sonic silver"); +CosmicColor.addToMap("#9E1316", "Spartan Crimson"); +CosmicColor.addToMap("#1D2951", "Space cadet"); +CosmicColor.addToMap("#807532", "Spanish bistre"); +CosmicColor.addToMap("#0070B8", "Spanish blue"); +CosmicColor.addToMap("#D10047", "Spanish carmine"); +CosmicColor.addToMap("#E51A4C", "Spanish crimson"); +CosmicColor.addToMap("#989898", "Spanish gray"); +CosmicColor.addToMap("#009150", "Spanish green"); +CosmicColor.addToMap("#E86100", "Spanish orange"); +CosmicColor.addToMap("#F7BFBE", "Spanish pink"); +CosmicColor.addToMap("#E60026", "Spanish red"); +CosmicColor.addToMap("#4C2882", "Spanish violet"); +CosmicColor.addToMap("#007F5C", "Spanish viridian"); +CosmicColor.addToMap("#0FC0FC", "Spiro Disco Ball"); +CosmicColor.addToMap("#A7FC00", "Spring bud"); +CosmicColor.addToMap("#00FF7F", "Spring green"); +CosmicColor.addToMap("#007BB8", "Star command blue"); +CosmicColor.addToMap("#4682B4", "Steel blue"); +CosmicColor.addToMap("#CC33CC", "Steel pink"); +CosmicColor.addToMap("#4F666A", "Stormcloud"); +CosmicColor.addToMap("#E4D96F", "Straw"); +CosmicColor.addToMap("#FC5A8D", "Strawberry"); +CosmicColor.addToMap("#FFCC33", "Sunglow"); +CosmicColor.addToMap("#E3AB57", "Sunray"); +CosmicColor.addToMap("#FAD6A5", "Sunset"); +CosmicColor.addToMap("#FD5E53", "Sunset orange"); +CosmicColor.addToMap("#CF6BA9", "Super pink"); +CosmicColor.addToMap("#D2B48C", "Tan"); +CosmicColor.addToMap("#F94D00", "Tangelo"); +CosmicColor.addToMap("#F28500", "Tangerine"); +CosmicColor.addToMap("#FFCC00", "Tangerine yellow"); +CosmicColor.addToMap("#483C32", "Dark Grayish Brown"); +CosmicColor.addToMap("#8B8589", "Taupe gray"); +CosmicColor.addToMap("#D0F0C0", "Tea green"); +CosmicColor.addToMap("#F4C2C2", "Tea rose"); +CosmicColor.addToMap("#008080", "Teal"); +CosmicColor.addToMap("#367588", "Teal blue"); +CosmicColor.addToMap("#99E6B3", "Teal deer"); +CosmicColor.addToMap("#00827F", "Teal green"); +CosmicColor.addToMap("#CF3476", "Telemagenta"); +CosmicColor.addToMap("#CD5700", "Tenne"); +CosmicColor.addToMap("#E2725B", "Terra cotta"); +CosmicColor.addToMap("#D8BFD8", "Thistle"); +CosmicColor.addToMap("#DE6FA1", "Thulian pink"); +CosmicColor.addToMap("#FC89AC", "Tickle Me Pink"); +CosmicColor.addToMap("#0ABAB5", "Tiffany Blue"); +CosmicColor.addToMap("#E08D3C", "Tiger's eye"); +CosmicColor.addToMap("#DBD7D2", "Timberwolf"); +CosmicColor.addToMap("#EEE600", "Titanium yellow"); +CosmicColor.addToMap("#FF6347", "Tomato"); +CosmicColor.addToMap("#746CC0", "Toolbox"); +CosmicColor.addToMap("#42B72A", "Toothpaste advert green"); +CosmicColor.addToMap("#FFC87C", "Topaz"); +CosmicColor.addToMap("#FD0E35", "Tractor red"); +CosmicColor.addToMap("#00755E", "Tropical rain forest"); +CosmicColor.addToMap("#0073CF", "True Blue"); +CosmicColor.addToMap("#417DC1", "Tufts Blue"); +CosmicColor.addToMap("#FF878D", "Tulip"); +CosmicColor.addToMap("#DEAA88", "Tumbleweed"); +CosmicColor.addToMap("#B57281", "Turkish rose"); +CosmicColor.addToMap("#40E0D0", "Turquoise"); +CosmicColor.addToMap("#00FFEF", "Turquoise blue"); +CosmicColor.addToMap("#A0D6B4", "Turquoise green"); +CosmicColor.addToMap("#7C4848", "Tuscan red"); +CosmicColor.addToMap("#C09999", "Tuscany"); +CosmicColor.addToMap("#8A496B", "Twilight lavender"); +CosmicColor.addToMap("#0033AA", "UA blue"); +CosmicColor.addToMap("#D9004C", "UA red"); +CosmicColor.addToMap("#8878C3", "Ube"); +CosmicColor.addToMap("#536895", "UCLA Blue"); +CosmicColor.addToMap("#FFB300", "UCLA Gold"); +CosmicColor.addToMap("#3CD070", "UFO Green"); +CosmicColor.addToMap("#120A8F", "Ultramarine"); +CosmicColor.addToMap("#4166F5", "Ultramarine blue"); +CosmicColor.addToMap("#FF6FFF", "Ultra pink"); +CosmicColor.addToMap("#635147", "Umber"); +CosmicColor.addToMap("#FFDDCA", "Unbleached silk"); +CosmicColor.addToMap("#5B92E5", "United Nations blue"); +CosmicColor.addToMap("#B78727", "University of California Gold"); +CosmicColor.addToMap("#FFFF66", "Unmellow yellow"); +CosmicColor.addToMap("#7B1113", "UP Maroon"); +CosmicColor.addToMap("#AE2029", "Upsdell red"); +CosmicColor.addToMap("#E1AD21", "Urobilin"); +CosmicColor.addToMap("#004F98", "USAFA blue"); +CosmicColor.addToMap("#F77F00", "University of Tennessee Orange"); +CosmicColor.addToMap("#D3003F", "Utah Crimson"); +CosmicColor.addToMap("#F3E5AB", "Vanilla"); +CosmicColor.addToMap("#F38FA9", "Vanilla ice"); +CosmicColor.addToMap("#C5B358", "Vegas gold"); +CosmicColor.addToMap("#C80815", "Venetian red"); +CosmicColor.addToMap("#43B3AE", "Verdigris"); +CosmicColor.addToMap("#E34234", "Medium vermilion"); +CosmicColor.addToMap("#D9381E", "Vermilion"); +CosmicColor.addToMap("#8F00FF", "Violet"); +CosmicColor.addToMap("#7F00FF", "Violet (color wheel)"); +CosmicColor.addToMap("#8601AF", "Violet (RYB)"); +CosmicColor.addToMap("#324AB2", "Violet-blue"); +CosmicColor.addToMap("#F75394", "Violet-red"); +CosmicColor.addToMap("#40826D", "Viridian"); +CosmicColor.addToMap("#009698", "Viridian green"); +CosmicColor.addToMap("#922724", "Vivid auburn"); +CosmicColor.addToMap("#9F1D35", "Vivid burgundy"); +CosmicColor.addToMap("#DA1D81", "Vivid cerise"); +CosmicColor.addToMap("#CC00FF", "Vivid orchid"); +CosmicColor.addToMap("#00CCFF", "Vivid sky blue"); +CosmicColor.addToMap("#FFA089", "Vivid tangerine"); +CosmicColor.addToMap("#9F00FF", "Vivid violet"); +CosmicColor.addToMap("#004242", "Warm black"); +CosmicColor.addToMap("#A4F4F9", "Waterspout"); +CosmicColor.addToMap("#645452", "Wenge"); +CosmicColor.addToMap("#F5DEB3", "Wheat"); +CosmicColor.addToMap("#FFFFFF", "White"); +CosmicColor.addToMap("#F5F5F5", "White smoke"); +CosmicColor.addToMap("#A2ADD0", "Wild blue yonder"); +CosmicColor.addToMap("#D470A2", "Wild orchid"); +CosmicColor.addToMap("#FF43A4", "Wild Strawberry"); +CosmicColor.addToMap("#FC6C85", "Wild watermelon"); +CosmicColor.addToMap("#FD5800", "Willpower orange"); +CosmicColor.addToMap("#A75502", "Windsor tan"); +CosmicColor.addToMap("#722F37", "Wine"); +CosmicColor.addToMap("#C9A0DC", "Wisteria"); +CosmicColor.addToMap("#C19A6B", "Wood brown"); +CosmicColor.addToMap("#738678", "Xanadu"); +CosmicColor.addToMap("#0F4D92", "Yale Blue"); +CosmicColor.addToMap("#1C2841", "Yankees blue"); +CosmicColor.addToMap("#FCE883", "Yellow (Crayola)"); +CosmicColor.addToMap("#EFCC00", "Yellow (Munsell)"); +CosmicColor.addToMap("#FEDF00", "Yellow (Pantone)"); +CosmicColor.addToMap("#FEFE33", "Yellow"); +CosmicColor.addToMap("#9ACD32", "Yellow Green"); +CosmicColor.addToMap("#FFAE42", "Yellow Orange"); +CosmicColor.addToMap("#FFF000", "Yellow rose"); +CosmicColor.addToMap("#0014A8", "Zaffre"); +CosmicColor.addToMap("#2C1608", "Zinnwaldite brown"); +CosmicColor.addToMap("#39A78E", "Zomp"); diff --git a/test/api/data/keyValueStore.test.ts b/test/api/data/keyValueStore.test.ts new file mode 100644 index 0000000..7c6367c --- /dev/null +++ b/test/api/data/keyValueStore.test.ts @@ -0,0 +1,12 @@ +import { kvGet, kvSet } from "@server/data/keyValueStore"; +import { test, expect } from "bun:test"; + +test("Key value store saves, loads, and deletes", async () => { + await kvSet("test", 1); + const val = await kvGet("test"); + expect(val).toBe(1); + + await kvSet("test", undefined); + const val2 = await kvGet("test"); + expect(val2).toBeUndefined(); +});