New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

discordjs-colors-bundle

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discordjs-colors-bundle - npm Package Compare versions

Comparing version 2.1.0 to 2.2.1

6

package.json
{
"name": "discordjs-colors-bundle",
"version": "2.1.0",
"version": "2.2.1",
"description": "Tons of colors for your DiscordJS bot's embed",

@@ -13,2 +13,6 @@ "main": "src/index.js",

],
"directories": {
"lib": "src",
"test": "test"
},
"scripts": {

@@ -15,0 +19,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

@@ -0,1 +1,5 @@

/**
*
* @returns {RandomHex} RandomHex
*/
function getRandomHexColor() {

@@ -49,2 +53,42 @@ var letters = "0123456789ABCDEF";

/**
*
* @param {RedInput} red
* @param {GreenInput} green
* @param {NumberInput} blue
* @returns {HexValue} hexValue
*/
function CustomRGB(red, green, blue) {
const redHex = red.toString(16).padStart(2, "0");
const greenHex = green.toString(16).padStart(2, "0");
const blueHex = blue.toString(16).padStart(2, "0");
const hexString = `0x${redHex}${greenHex}${blueHex}`;
return parseInt(hexString.toLowerCase());
}
/**
*
* @param {RedInput} red
* @param {GreenInput} green
* @param {BlueInput} blue
* @param {AlphaInput} alpha
* @returns {HexCode} hexCode
*/
function CustomRGBA(red, green, blue, alpha) {
const redHex = red.toString(16).padStart(2, "0");
const greenHex = green.toString(16).padStart(2, "0");
const blueHex = blue.toString(16).padStart(2, "0");
const alphaHex = Math.round(alpha * 255)
.toString(16)
.padStart(2, "0");
const hexString = `0x${redHex}${greenHex}${blueHex}${alphaHex}`;
return parseInt(hexString.toLowerCase());
}
/**
* - The color object for Discord.js

@@ -471,2 +515,4 @@ * - It has more than 148 colors

InternetColors: internetColors,
CustomRGB: CustomRGB,
CustomRGBA: CustomRGBA,
};

@@ -0,8 +1,52 @@

type RedInput = number;
type GreenInput = number;
type BlueInput = number;
type AlphaInput = number;
type HexValue = number;
type HexCode = number;
type RandomHex = number;
/**
* Returns a random hexadecimal color value as a number.
* @returns {RandomHex} RandomHex
*/
declare function getRandomHexColor(): RandomHex;
Returns a random hexadecimal color as a number.
*/
declare function getRandomHexColor(): number;
/**
* Converts a hexadecimal color code to a number.
* @param {string} hexCode The hexadecimal color code.
* @returns {number} The converted number.
* @throws {ColorConvertError} If the input is not a string or is an invalid format.
*/
declare function CustomHex(hexCode: string): number;
/**
* Converts RGB color values to a hexadecimal color code.
* @param {RedInput} red The red color value.
* @param {GreenInput} green The green color value.
* @param {BlueInput} blue The blue color value.
* @returns {HexValue} The hexadecimal color code.
*/
declare function CustomRGB(
red: RedInput,
green: GreenInput,
blue: BlueInput
): HexValue;
/**
* Converts RGBA color values to a hexadecimal color code.
* @param {RedInput} red The red color value.
* @param {GreenInput} green The green color value.
* @param {BlueInput} blue The blue color value.
* @param {AlphaInput} alpha The alpha (transparency) value.
* @returns {HexCode} The hexadecimal color code.
*/
declare function CustomRGBA(
red: RedInput,
green: GreenInput,
blue: BlueInput,
alpha: AlphaInput
): HexCode;
/**
Returns the number representation of the given hexadecimal color code.

@@ -18,3 +62,151 @@ @param hexCode The hexadecimal color code (e.g. '#ff0000').

interface Colors {
[key: number]: number;
Red: number;
Orange: number;
Yellow: number;
Green: number;
Blue: number;
Indigo: number;
Violet: number;
Purple: number;
Lime: number;
LemonJuice: number;
CadetBlue: number;
HotPink: number;
CornFlowerBlue: number;
Brick: number;
OliveDrab: number;
Olive: number;
Coral: number;
LightCoral: number;
Cyan: number;
LightCyan: number;
Aqua: number;
Aquamarine: number;
Salmon: number;
SeaGreen: number;
SeaBlue: number;
LightSeaGreen: number;
SkyBlue: number;
LightSkyBlue: number;
SpringGreen: number;
Tomato: number;
Chartreuse: number;
DarkChartreuse: number;
SandyBrown: number;
Plum: number;
MysticMauve: number;
ElectricKiwi: number;
VelvetMaroon: number;
TurquoiseSurf: number;
MidnightSun: number;
CherryBlossomPink: number;
LavenderHaze: number;
CaramelLatte: number;
Goldenrod: number;
IndigoNight: number;
SeafoamSplash: number;
LimeFizz: number;
SapphireDepths: number;
MintMist: number;
FrostyFern: number;
MidnightMarina: number;
WildStrawberry: number;
DeepAqua: number;
BerrySorbet: number;
DreamyLavender: number;
WildWatermelon: number;
FrostyMint: number;
PeachyPink: number;
PastelPeach: number;
CandyPink: number;
PowderBlue: number;
Azzurro: number;
AmaranthPink: number;
Aubergine: number;
Byzantium: number;
CaputMortuum: number;
CeruleanFrost: number;
Coquelicot: number;
DarkByzantium: number;
EtonBlue: number;
Feldgrau: number;
Gainsboro: number;
HeliotropeGray: number;
InternationalKleinBlue: number;
Jasper: number;
KhakiRose: number;
LemonCurry: number;
Malachite: number;
MikadoYellow: number;
NadeshikoPink: number;
Olivine: number;
PansyPurple: number;
PapayaWhip: number;
Periwinkle: number;
PersianPlum: number;
PhthaloGreen: number;
PineGreen: number;
QuinacridoneMagenta: number;
RoseMadder: number;
SapphireBlue: number;
SeafoamGreen: number;
Smalt: number;
Tan: number;
TaupeGray: number;
Tawny: number;
Tumbleweed: number;
TyrianPurple: number;
Ube: number;
Verdigris: number;
ViridianGreen: number;
Wheat: number;
Wisteria: number;
Xanadu: number;
YaleBlue: number;
Zaffre: number;
Zomp: number;
Sarcoline: number;
Coquelicot: number;
Sinopia: number;
Smaragdine: number;
Glaucous: number;
AmaranthDeepPurple: number;
BlueSapphire: number;
Byzantine: number;
CeladonGreen: number;
Cinnabar: number;
CobaltBlue: number;
CoralRed: number;
CurrantRed: number;
DarkSeaGreen: number;
DeepCarminePink: number;
DeepJungleGreen: number;
DeepViolet: number;
ElectricIndigo: number;
Fandango: number;
Heliotrope: number;
IndigoDye: number;
Iridescent: number;
LavenderGray: number;
Lava: number;
LemonGlacier: number;
LightSlateGray: number;
MaximumBlueGreen: number;
MidnightGreen: number;
OldRose: number;
OtterBrown: number;
PaleTaupe: number;
PeachPuff: number;
PersianBlue: number;
Phlox: number;
Pineapple: number;
PrussianBlue: number;
Raspberry: number;
RichBlack: number;
RoseGold: number;
Russet: number;
SmokyBlack: number;
SpanishGray: number;
TiffanyBlue: number;
RandomAdvanced: Function;
}

@@ -26,3 +218,36 @@ /**

interface InternetColors {
[key: number]: number;
SocialMedia: {
FacebookLogo: number;
TwitterLogo: number;
InstagramLogo: number;
LinkedInLogo: number;
SnapchatLogo: number;
};
Communication: {
DiscordLogo: number;
ZoomLogo: number;
SkypeLogo: number;
SlackLogo: number;
};
ECommerce: {
AmazonLogo: number;
eBayLogo: number;
ShopifyLogo: number;
};
Musics: {
MusicStreaming: {
SpotifyLogo: number;
AppleMusicLogo: number;
TidalLogo: number;
};
MusicRecognition: {
ShazamLogo: number;
MusixmatchLogo: number;
};
MusicalInstruments: {
FenderLogo: number;
GibsonLogo: number;
YamahaLogo: number;
};
};
}

@@ -34,3 +259,26 @@ /**

interface ProductColors {
[key: number]: number;
Soap: {
DettolOriginalSoap: number;
LifebuoyTotal10Soap: number;
DoveWhiteBeautyBarSoap: number;
IvoryOriginalBathSoap: number;
};
Electronics: {
RazerBlade15GamingLaptop: number;
AppleiPhone13ProMax: number;
SamsungGalaxyS21Ultra: number;
SonyPlayStation5: number;
};
FoodAndBeverages: {
CocaColaClassic: number;
Pepsi: number;
KitKat: number;
Oreo: number;
};
Clothing: {
NikeAirMax97: number;
AdidasOriginalsSuperstar: number;
Levis501OriginalJeans: number;
HAndMBasicTshirt: number;
};
}

@@ -59,3 +307,2 @@ /**

getRandomHexColor,
CustomHex,
colors,

@@ -67,2 +314,5 @@ internetColors,

ProductColors,
CustomRGB,
CustomHex,
CustomRGBA,
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc