mirror of
https://github.com/Art-Portal/April.git
synced 2024-12-26 11:24:16 +01:00
Set preview length to match number of colors in palette
This commit is contained in:
parent
e1cff46942
commit
5081eb8767
@ -36,7 +36,7 @@ async function generateRandomPalette() {
|
||||
|
||||
// Fonction pour créer une image représentant la palette de couleurs
|
||||
async function createPaletteImage(colors) {
|
||||
const canvas = Canvas.createCanvas(200, 50);
|
||||
const canvas = Canvas.createCanvas(colors.length * 40, 50);
|
||||
const ctx = canvas.getContext('2d');
|
||||
|
||||
// Dessine les rectangles de couleur sur le canvas
|
||||
|
Loading…
Reference in New Issue
Block a user