You're on the right track - just add that to kgpanels onload scripts. Although I'd recommend adding a reference to CUSTOM_CLASS_COLORS, just so that you don't have to re-write your scipts if you choose to start altering the class colors.
lua Code:
local _, Class = UnitClass("player")
local Color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[Class]
self:SetBackdopBorderColor(Color.r, Color.g, Color.b)