in gulpfile.js/tasks/colors.js [22:37]
function formatGPL(result) {
return result.get('props').filter(prop => !prop.get('value').startsWith('rgba'))
.map(prop => {
return `${prop.get('value').replace('rgb(', '').replace(')', '')} ${prop.get('name').replace(/-/g, ' ')} \n`;
})
// convert to js for proper formatting
.toJS()
// convert to string to run replace function
.toString()
// replace commas created by .toJS
.replace(/,/g, '')
// convert strings to title case
.replace(/\w\S*/g, txt => {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
});
}