View Single Post
05-07-21, 10:09 AM   #10
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
It seems that SetColorTexture respects any SetGradient in place but SetVertexColor overrides SetGradient. Since SetColorTexture is set to pure white by default we just need to use SetVertexColor to set the average of the gradient. Untested code:
Lua Code:
  1. hooksecurefunc("DefaultCompactUnitFrameSetup", function(frame)
  2.     frame.myHealPrediction:SetVertexColor(19/510, 229/510, 177/510)
  3.     frame.otherHealPrediction:SetVertexColor(32/510, 142/510, 115/510)
  4. end)
  5.  
  6. hooksecurefunc("DefaultCompactMiniFrameSetup", function(frame)
  7.     frame.myHealPrediction:SetVertexColor(19/510, 229/510, 177/510)
  8.     frame.otherHealPrediction:SetVertexColor(5/510, 5173/510, 23/510)
  9. end)
  Reply With Quote