static function getSwatchesInkscape($Appearance) { $label = $Appearance['label']; $exportts = gmdate('Y-m-d H:i:s \\G\\M\\T'); $File = <<<GPL GIMP Palette Name: {$label} Columns: 6 # # Exported at: {$exportts} # GPL; $CGs = ColorGroups::get($Appearance['id']); $Colors = ColorGroups::getColorsForEach($CGs); foreach ($CGs as $cg) { foreach ($Colors[$cg['groupid']] as $c) { $rgb = CoreUtils::hex2Rgb($c['hex']); $File .= CoreUtils::pad($rgb[0], 3, ' ') . ' ' . CoreUtils::pad($rgb[1], 3, ' ') . ' ' . CoreUtils::pad($rgb[2], 3, ' ') . ' ' . $cg['label'] . ' | ' . $c['label'] . PHP_EOL; } } CoreUtils::downloadFile(rtrim($File), "{$label}.gpl"); }