Skip to content

Instantly share code, notes, and snippets.

View garudamon's full-sized avatar
:shipit:

Ali garudamon

:shipit:
View GitHub Profile
@garudamon
garudamon / app.js
Created April 1, 2022 03:27
Colors Scheme Collector
// this script is only working with:
// https://www.schemecolor.com/?s=pastel
const rgb2hex = (rgb) => `#${rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/).slice(1).map(n => parseInt(n, 10).toString(16).padStart(2, '0')).join('')}`;
let colors = [];
document.querySelectorAll('.color-palettes-list li').forEach((ct) => {
let c = ct.querySelectorAll('.c');
let clen = c.length;
for (let i = 0; i < clen; i++) {