Export vignette RGB/Hex en SVG

Fermé
Noweare - 1 oct. 2020 à 14:59
 Noweare - 1 oct. 2020 à 18:43
Bonjour,

Demande un peu spécifique, puisque j'ai un gros doute sur la faisabilité de la chose.
Je m'explique :

J'ai des couleurs générées en hex, dans un tableau. Jusque là, très bien.
Maintenant, je souhaiterais exporter l'ensemble des vignettes du tableau, en .svg.
-> ça j'y arrive.

La difficulté, c'est que mon export n'est qu'une liste de pastille de 32x32px.
Ce que je voudrais, c'est de les exporter séparément en gardant pour chacune d'elle, le title="nom_de_la_couleur".

Voici ce que donne le tableau :



<color title="nom_de_la_couleur" class="vignette ">
<a href="#">
<table cellspacing="0" cellpadding="0" style="width:32px; height:32px">
<tbody>
<tr>
<td style="display:block; background-color:#0084a0;"></td>
</tr>
</tbody>
</table>
</a>
</color>

<color title="nom_de_la_couleur" class="vignette ">
<a href="#">
<table cellspacing="0" cellpadding="0" style="width:32px; height:32px">
<tbody>
<tr>
<td style="display:block; background-color:#d23278;"></td>
</tr>
</tbody>
</table>
</a>
</color>

<color title="nom_de_la_couleur" class="vignette ">
<a href="#">
<table cellspacing="0" cellpadding="0" style="width:32px; height:32px">
<tbody>
<tr>
<td style="display:block; background-color:#d64c33"></td>
</tr>
<tr>
<td style="display:block; background-color:#39505c"></td>
</tr>
</tbody>
</table>

</a>
</color>

<color title="nom_de_la_couleur" class="vignette ">
<a href="#">
<table cellspacing="0" cellpadding="0" style="width:32px; height:32px">
<tbody>
<tr>
<td style="display:block; background-color:#fff9e3"></td>
</tr>
<tr>
<td style="display:block; background-color:#d33279"></td>
</tr>
<tr>
<td style="display:block; background-color:#fff9e3"></td>
</tr>
</tbody>
</table>
</color>



Connaissez-vous une méthode, pour combiner une table couleur + son titre (ou alt) et l'exporter ou générer une image?
(svg ou autre).

Merci
A voir également:

2 réponses

jordane45 Messages postés 38138 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 17 avril 2024 4 649
1 oct. 2020 à 17:37
Bonjour,

Déjà, il faudrait nous indiquer avec quel langage tu fais ton export
0
J'importe le .html dans un convertisseur svg tout bêtement.
Dans ce cas, l'export est bon, mais groupé.
C'est justement ma demande, si il existe une methode, autre que cette bidouille que je fais. A chaque problème il y a une solution :)
0