recueil-de-couleur
Advanced tools
Comparing version 0.6.0 to 0.7.0
{ | ||
"name": "recueil-de-couleur", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Liste de noms de couleur en français.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,4 +11,4 @@ # Noms de Couleurs | ||
## List of Color Names 🔖 (**787**) | ||
## List of Color Names 🔖 (**1147**) | ||
![Toutes les couleurs](colors.svg "Liste de couleur") |
@@ -112,4 +112,70 @@ import fs from 'fs'; | ||
}, | ||
{ | ||
name: 'Dulux', | ||
sources: [ | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_White#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Red#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Orange#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Gold#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Yellow#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Lime#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Green#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Teal#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Blue#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Violet#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Cool%20neutral#tabId=item0', | ||
'https://www.duluxvalentine.com/fr/couleurs/filters/h_Warm%20neutral#tabId=item0', | ||
], | ||
fn: _ => { | ||
const colorList = []; | ||
const colorTable = document.querySelector('.related-colors'); | ||
const colorRows = colorTable.querySelectorAll('.js-color-card'); | ||
for (let y = 1; y < colorRows.length; y++) { | ||
const colorRow = colorRows[y]; | ||
const link = 'https://www.duluxvalentine.com/fr/couleurs'; | ||
const hex = colorRow.dataset.hex; | ||
let name = colorRow.querySelector('.color-card-label').innerHTML; | ||
name = name.replace(/RAL \d+/g, '').trim(); | ||
colorList.push({ | ||
name, hex, link, | ||
}); | ||
} | ||
return colorList; | ||
} | ||
}, | ||
{ | ||
name: 'Papeteries Montsegur', | ||
sources: [ | ||
'https://www.papeteries-montsegur.com/content/23-nuancier-interactif?content_only=1', | ||
], | ||
fn: _ => { | ||
const colorList = []; | ||
const colorRows = document.querySelectorAll('#sb-container > div:not(:last-child)'); | ||
for (let y = 1; y < colorRows.length; y++) { | ||
const colorRow = colorRows[y]; | ||
const link = 'https://www.papeteries-montsegur.com/'; | ||
const hex = window.getComputedStyle( | ||
colorRow | ||
)['background-color']; | ||
const name = colorRow.querySelector('h4 > span').innerHTML.split('<br>')[0].trim(); | ||
colorList.push({ | ||
name, hex, link, | ||
}); | ||
} | ||
return colorList; | ||
} | ||
}, | ||
]; | ||
let colors = []; | ||
@@ -157,3 +223,3 @@ | ||
if (!c.hex) { | ||
console.wran(`invalid hex: ${c.name} (${c.link})`); | ||
console.warn(`invalid hex: ${c.name} (${c.link})`); | ||
} | ||
@@ -160,0 +226,0 @@ }); |
@@ -17,4 +17,49 @@ { | ||
"author": "@meodai" | ||
}, | ||
{ | ||
"name": "rouge à lèvres", | ||
"hex": "#d22e2e", | ||
"author": "@meodai" | ||
}, | ||
{ | ||
"name": "Pourpre Hélios", | ||
"hex": "#a3294d", | ||
"author": "@meodai" | ||
}, | ||
{ | ||
"name": "Vert émeraude", | ||
"hex": "#31725c", | ||
"author": "@meodai" | ||
}, | ||
{ | ||
"name": "bleu de minuit", | ||
"hex": "#1e1e2f", | ||
"author": "@meodai" | ||
}, | ||
{ | ||
"name": "Rouge de Venise", | ||
"hex": "#6b3634", | ||
"author": "@meodai" | ||
}, | ||
{ | ||
"name": "Pierre de fiel", | ||
"hex": "#e5b53f", | ||
"author": "@meodai" | ||
}, | ||
{ | ||
"name": "Noir de Mars", | ||
"hex": "#0f100d", | ||
"author": "@meodai" | ||
}, | ||
{ | ||
"name": "Vert de mai", | ||
"hex": "#6ca843", | ||
"author": "@meodai" | ||
}, | ||
{ | ||
"name": "Turquoise de cobalt", | ||
"hex": "#469bb1", | ||
"author": "@meodai" | ||
} | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
552834
6095