TREEMAP: setting colors in sub-groups to a continuous grading based on value within group (Outer colors should retain initial grading)

Hi All Im trying to assign color grading to the following treemap plot. I wish to assign a “greying” of the colors in the leaf nodes based on a value to be placed in the data section. How can I acheive this yet retain the initial color-layout?

Plotly.d3.csv(‘https://homepages.ecs.vuw.ac.nz/~radek/CoreCapLearning.csv’, function(err, rows){
function unpack(rows, key) {
return rows.map(function(row) { return row[key]});
}
var data = [{
type: “treemap”,
ids: unpack(rows, ‘ids’),
labels: unpack(rows, ‘labels’),
parents: unpack(rows, ‘parents’),
}];

var layout={
height: 1400,
hovermode: “closest”,
width: 2200,
};
Plotly.newPlot(‘LearningDiv’, data,layout );
});

Also see

https://homepages.ecs.vuw.ac.nz/~radek/testing.html