Make Layer Fill Colour Black or White Depending on Dropdown Menu with 16 Colours
AE 23.1.0
macOS BigSur 11.7.1
Hi. I'm in the process of making branded MOGRTs for our University. We have 16 brand colours, which I've made available to choose from via a dropdown menu in my 'CONTROLS' null. This controls the Effect > Fill on the background shape. See below.

I have a 'Text/Logo Colour Control' (to toggle between black or white elements), but we don't want to give users this control, because they may end up using black on a colour which is too dark, for example (see below).

We want to restrict the text and logo elements to either white, or black, depending on the colour chosen for the background in the dropdown.
All the Fill effects on the text/logo layers are parented to the Effects > Fill on the headline layer 'Helvetica Neue 85 Heavy'. So in theory, I just need some code which tells After Effects to change the Effect > Fill on "Helvetica Neue 85 Heavy" to white or black, depending on the dropdown menu choice for the 'Background Colour Control'.
The code used on the background shape layer is:
dropDownIndex = thisComp.layer("CONTROLS").effect("Background Colour Control")("Menu").value; switch ( dropDownIndex ){
case 1: hexToRgb("B01C2E") break;
case 2: hexToRgb("000000") break;
case 3: hexToRgb("E5E6E5") break;
case 4: hexToRgb("FFFFFF") break;
case 5: hexToRgb("00C0B5") break;
case 6 :hexToRgb("00434F") break;
case 7: hexToRgb("0CC6DE") break;
case 8: hexToRgb("002F5F") break;
case 9: hexToRgb("EE7219") break;
case 10: hexToRgb("6D2601") break;
case 11: hexToRgb("9278D1") break;
case 12: hexToRgb("42145F") break;
case 13: hexToRgb("E0249A") break;
case 14: hexToRgb("772059") break;
case 15: hexToRgb("BED600") break;
case 16: hexToRgb("53682B") break;
default: hexToRgb("B01C2E") };
Please let me know if it's possible to achieve only white or black for the text/logo elements, conditional on the colour a user chooses for the background shape. We're assuming it's an if/else expression of some sort!
Thanks in advance for any help you might have.
