You can try to modify this script:
var doc = app.activeDocument;
var mm = 2.83465;
var start_left = 20*mm;
var start_top = 20*mm;
var gap = 0.2*mm;
var size_3x3_boxes = 5*mm;
var start_color = new CMYKColor();
start_color.c = 0;
start_color.m = 0;
start_color.y = 0;
start_color.k = 0;
var color = start_color;
for (var i=0; i<21; i++) {
draw_11x11_grid(start_top, start_left, size_3x3_boxes, gap, color)
start_top += 60*mm;
color.cyan = 0;
color.magenta = 0;
try {color.yellow += 5} catch(e) {} // <-- HERE THE YELLOW IS CHANGING
}
function draw_11x11_grid(start_top, start_left, size, gap, color) {
var top = start_top;
for (var j=0; j<11; j++) {
var left = start_left;
for (var i=0; i<11; i++) {
draw_3x3_boxes(top, left, size, gap, color);
try {color.magenta += 10} catch(e) {}
left += (size+gap*2);
}
left = start_left;
top += (size+gap*2);
color.magenta = 0;
try {color.cyan += 10} catch(e) {}
}
}
function draw_3x3_boxes(y, x, size, gap, color) {
var w = (size - gap*2)/3;
var h = (size - gap*2)/3;
color.black = 0;
var box = draw_box(y, x, w, h, color);
add_two_boxes(box, gap);
color.black = 30;
var box = draw_box(y + box.height + gap, x, w, h, color);
add_two_boxes(box, gap);
color.black = 60;
var box = draw_box(y + (box.height + gap)*2, x, w, h, color);
add_two_boxes(box, gap);
}
function add_two_boxes(box, gap) {
var box1 = box.duplicate();
box1.left += box.width + gap;
box1.fillColor.black += 10;
var box2 = box1.duplicate();
box2.left += box.width + gap;
box2.fillColor.black += 10;
}
function draw_box(y, x, w, h, color) {
var box = doc.pathItems.rectangle(-y, x, w, h);
box.stroked = false;
box.filled = true;
box.fillColor = color;
return box;
}
It gets you this:
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/oJnSdzEA.png)
If you want just to change the yellow channel of selected objects it can be done this way:
var sel = app.selection;
for (var i=0; i<sel.length; i++) {
try { sel[i].fillColor.yellow += 5 } catch(e) {}
}
It increases by 5% the yellow channel of selected objects.
I changed the first code to make it to create 20 tables with 5% steps of yellow color.