• Getting the variables of a derma color picker?
    0 replies, posted
I used this tutorial Derma Basic Guide to create a derma window with a color picker. And it works fine, even printing the table of colors as shown there. I wanna use the color picker to give 3 variables (r,g,b) a number. the r,g,b number..obviously. So a addon of mine can use it to recolor something. I know how to print the table, or get the table. But how do i get the seperate r,g,b and maybe even alpha numbers to put them in variables? local function VAMenu()     local frame = vgui.Create("DFrame")     frame:SetSize(300,350)     frame:SetTitle("Please select a color for the Elements")     frame:Center()     frame:SetVisible(true)     frame:MakePopup()      --the colorpicker     local Mixer = vgui.Create("DColorMixer", frame)     Mixer:SetPos(10,30)     Mixer:SetPalette(true)     Mixer:SetAlphaBar(true)     Mixer:SetWangs(true)     Mixer:SetColor(Color(255,255,255)) --Here starts the Button to save the colors. Where i have problems     local Confirm = vgui.Create("DButton", frame )     Confirm:SetText("I want this color")     Confirm:SetSize(90, 30)     Confirm:SetPos(100, frame:GetTall()-75)     Confirm.DoClick = function()         ChosenColor = Mixer:GetColor()         PrintTable(ChosenColor)     end end i tryd finding a function in gmod wiki but im not able to find one..i find stuff like get the table of it, or convars with it? Really confused on that part now..i simply want to have the r,g,b of it seperately to put in seperate variables. to use in Color(r,g,b) for my addon
Sorry, you need to Log In to post a reply to this thread.