Hey, would you consider making your mod support Disco Science? I've made an API to make it easy to register new and modified ingredient colours: https://mods.factorio.com/mod/DiscoScience/faq
I think adding this to a control.lua, and an optional dependency on Disco Science 1.0.0 should cover you:
script.on_configuration_changed(
function ()
if remote.interfaces["DiscoScience"] and remote.interfaces["DiscoScience"]["setIngredientColor"] then
if settings.startup["bobmods-tech-colorupdate"].value then
remote.call("DiscoScience", "setIngredientColor", "automation-science-pack", {r = 1.0, g = 0.9, b = 0.1})
remote.call("DiscoScience", "setIngredientColor", "logistic-science-pack", {r = 1.0, g = 0.1, b = 0.1})
remote.call("DiscoScience", "setIngredientColor", "utility-science-pack", {r = 0.1, g = 1.0, b = 0.1})
end
remote.call("DiscoScience", "setIngredientColor", "advanced-logistic-science-pack", {r = 1.0, g = 0.1, b = 1.0})
end
end
)