MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / drawPatternBackground

Function drawPatternBackground

quote/generate.js:140–160  ·  view source on GitHub ↗
(canvas, colorOne, colorTwo, patternImage, lumOne, lumTwo)

Source from the content-addressed store, hash-verified

138 s = Math.min(1, Math.max(s * 1.8, 0.35));
139 }
140 return {
141 center: hslToHex(h, s, 0.8),
142 edge: hslToHex(h, s, 0.62),
143 patternAlpha: 0.18,
144 };
145}
146
147// ── Message normalisation ──────────────────────────────────────────────
148function normalizeMessage(message) {
149 if (!message.from) {
150 message.from = { id: 0 };
151 }
152 if (!message.from.photo) {
153 message.from.photo = {};
154 }
155 if (message.from.name !== false && !message.from.name && (message.from.first_name || message.from.last_name)) {
156 message.from.name = [message.from.first_name, message.from.last_name]
157 .filter(Boolean)
158 .join(" ");
159 }
160 if (message.replyMessage) {
161 if (!message.replyMessage.chatId) {
162 message.replyMessage.chatId = message.from.id || 0;
163 }

Callers 1

generateQuoteFunction · 0.85

Calls 1

imageAlphaFunction · 0.85

Tested by

no test coverage detected