I am supporting CandidateX

CandidateX is a startup that focuses on creating inclusion-focused hiring solutions, designed to increase access to job opportunities for underestimated talent. Check them out if you have a few minutes to spare. They need visibility!

In Color scheme explorer the main color processing scripts are hosted in Google Apps Script. There’s particular no reason to do this, except that it means that I can ensure I use the same algorithms in JavaScript as I do in GAS.
Building on Using Gas as a CDN, where I use the GAS publisher and content service to serve up JavaScript, here’s how it works in the  Color scheme explorer

Asynchronous loading

When it starts up, you may notice this

Here’s what’s happening then..
Deprecated
The visual is using Parse.com that has now become parseplatform.org. The above cannot be displayed. The code needs adapted to parseplatform. If you have already worked with the platform or think you can adapt the code below to parseplatform i would be grateful for you to contact me.

Called here, and moving on to load Data from parse.com once the load promise for each of the required apps script functions is fulfilled.

$('#status').text("...getting google apps script modules");$.when.apply($,loadModules (["vEquivalents","hacks","usefulColors"],"mcpher")).then (    function () {        var randomColor = randomBar();        // get the currently selected scheme, and if nothing entered yet, generate a random scheme        getSelectedScheme($('#schemeselector').val())            .done( function() {                if (!$('#hexinput').val()) calculateColors (rgbToHTMLHex(randomColor),"random color");               });     },     function (error) {        console.log(JSON.stringify(error)); });  Again, the use of promises simplifies and abstracts away the whole messy business of asynchronicity.  More on the color schemer app?