How to pick color from ramp and apply it to the material?

I made 1-pixel ramp where I specified color gradient. Now, I want to change color of my geometry over time according to this ramp. How would you accomplish this?
I got TOPto CHOP to transform to RGB channels, now I need extract specific sample of each channel and apply it to material emit color accordingly.
Thanks in advance,

  1. Lookup CHOP to cycle through samples → CHOPtoTOP → Material
  2. Constant TOP → Python sample RGBA of the ramp → RGBA of Constant TOP → Material
  3. Ramp TOP using an Evaluate DAT to feed the ramp_keys of Ramp TOP → Material

I’ve attached a .toe demonstrating each method with a performance monitor to show the total cook time of each workflow. Using the Lookup CHOP is significantly faster compared to sampling and evaluating (~.09ms / ~.26ms / ~.45ms) - however each workflow has its own benefits depending on the situation. In general I would try to use CHOPS if the situation allows it.
rampSampling.toe (6.01 KB)