How Do i change the colour of a button LUA

Hi guys looking to change the background colour of this button really new with lua but heres my attempt that doesnt work at all.



	if PS.Config.CanPlayersGivePoints then
		local givebutton = vgui.Create('DButton', preview or self,)
		givebutton:SetColor(34, 48, 61, 255)
		givebutton:SetText("Give "..PS.Config.PointsName)
		if PS.Config.DisplayPreviewInMenu then
			givebutton:DockMargin(8, 8, 8, 8)
		else
			givebutton:DockMargin(8, 0, 8, 8)
		end
		givebutton:Dock(BOTTOM)
		givebutton.DoClick = function()
			vgui.Create('DPointShopGivePoints')
		end
	end



you can use this http://wiki.garrysmod.com/page/Category:DColorButton

Or hook into the button’s Paint function and draw a surface rect with whatever colour you want

Use Paint on the button, the wiki page explains it. SetColor does nothing. Use SetTextColor to set the text colour if you are going to.

That’s what I said?