Need help! MarkupObject not functioning as intended!



for k, v in pairs(self.weaponDisplayInfo) do
        v[4] = math.Round(v[4], 3)
        self.textTable[k] = markup.Parse("<font=" .. self.font .. "><colour=255, 255, 255>".. v[2] .. "</colour><colour=" .. v[3][1] .. "," .. v[3][2] .. ","  .. v[3][3] .. ">" .. v[4] .. "</colour></font>")
    end




--//Done in a Paint function
for k, v in pairs(self.textTable) do
        if k < 4 then
            v:Draw(self.weaponModelWide + 6, 15 * k, v[4], TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, 255)
        elseif k < 7 then
            v:Draw(self.weaponModelWide + (self:GetWide() - self.weaponModelWide) / 3, 15 * (k - 3), v[4], TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, 255)
        elseif k < 10 then
            v:Draw(self.weaponModelWide + (self:GetWide() - self.weaponModelWide) * (2 / 3), 15 * (k - 6), v[4], TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER, 255)
        end
    end


For some reason, the text is being drawn extremely dimmed. You may notice the color after “Recoil:” is different. That color is set to rgb: 170, 0, 0. Does anyone know why the text is being drawn so dim? I’m doing everything correctly, as far as I can tell.

why do you want to use a markup object for that? why not

draw.SimpleText?

It’s the only way I’ve figured out to easily combine text of different color, as well as it supports string commands (?) such as
and .

You could try RichText which has text commands and

Panel:InsertColorChange

I suppose it works for now. Required a lot of rewriting but it’s functioning.