UNPKG

plotboilerplate

Version:

A simple javascript plotting boilerplate for 2d stuff.

58 lines 2.38 kB
"use strict"; /** * @author Ikaros Kappler * @date 2018-11-10 * @modified 2020-10-23 Ported to Typescript. * @modified 2020-10-30 Exporting each color under its name globally. * @modified 2025-12-08 Replaying self defined colors by official web colors. * @modified 2026-03-18 Fixing global `WebColors` array. * @version 1.0.3 **/ Object.defineProperty(exports, "__esModule", { value: true }); exports.shuffleWebColors = exports.WebColors = exports.LightGreen = exports.Green = exports.Teal = exports.Cyan = exports.LightBlue = exports.Blue = exports.Indigo = exports.DeepPurple = exports.Purple = exports.Pink = exports.Red = void 0; var Color_1 = require("./datastructures/Color"); exports.Red = Color_1.Color.Red; // Color.makeRGB(255,67,55); exports.Pink = Color_1.Color.Pink; // Color.makeRGB(232,31,100); exports.Purple = Color_1.Color.Purple; // Color.makeRGB(156,39,175); exports.DeepPurple = Color_1.Color.DeepPink; // Color.makeRGB(103,59,184); exports.Indigo = Color_1.Color.Indigo; // Color.makeRGB(64,81,181); exports.Blue = Color_1.Color.Blue; // Color.makeRGB(35,151,245); exports.LightBlue = Color_1.Color.LightBlue; // Color.makeRGB(6,170,245); exports.Cyan = Color_1.Color.Cyan; // Color.makeRGB(3,189,214); exports.Teal = Color_1.Color.Teal; // Color.makeRGB(1,150,137); exports.Green = Color_1.Color.Green; // Color.makeRGB(77,175,82); exports.LightGreen = Color_1.Color.LightGreen; // Color.makeRGB(141,195,67); /** * A set of beautiful web colors (I know, beauty is in the eye of the beholder). * * I found this color chart with 11 colors and think it is somewhat nice * https://www.pinterest.com/pin/229965124706497134/ * * @requires Color * */ exports.WebColors = [ Color_1.Color.Red, Color_1.Color.Pink, Color_1.Color.Purple, Color_1.Color.DeepPink, Color_1.Color.Indigo, Color_1.Color.Blue, Color_1.Color.LightBlue, Color_1.Color.Cyan, Color_1.Color.Teal, Color_1.Color.Green, Color_1.Color.LightGreen ]; /** * A helper function to shuffle the colors into a new order. */ var shuffleWebColors = function (order) { var result = Array(order.length); for (var i = 0; i < order.length; i++) { result[i] = exports.WebColors[order[i] % exports.WebColors.length]; } return result; }; exports.shuffleWebColors = shuffleWebColors; //# sourceMappingURL=WebColors.js.map