mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 14:55:40 +02:00
Dominant Color Command
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user