Dominant Color Command

This commit is contained in:
Dragon Fire
2021-01-16 13:09:41 -05:00
parent 2acd6b22ed
commit 7f9fdfb2f6
4 changed files with 53 additions and 2 deletions
+5
View File
@@ -176,6 +176,11 @@ module.exports = class Util {
return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0);
}
static rgbToHex(r, g, b) {
if (r > 255 || g > 255 || b > 255) return null;
return ((r << 16) | (g << 8) | b).toString(16);
}
static magikToBuffer(magik) {
return new Promise((res, rej) => {
magik.toBuffer((err, buffer) => {