💣
idontgiveaf's fluent gui
  • Fluent Library
    • Example Script
  • Fluent
    • Setup
      • Interface and Save Manager
      • Properties
  • Components
    • Window
      • Tabs
      • Dialog
  • elements
    • Guide
      • Destroying Elements
      • Section
      • Paragraphs
      • Buttons
      • Toggles
      • Sliders
      • Inputs
      • Dropdowns
      • Colorpickers
      • Keybinds
Powered by GitBook
On this page
  1. elements
  2. Guide

Colorpickers

To create a colorpicker, use this.

local Colorpicker = Tabs.Main:AddColorpicker("Colorpicker", {
    Title = "Colorpicker",
    Description = "Description for colorpicker",
    Default = Color3.fromRGB(96, 205, 255),
    -- (Optional) Transparency = 0,
    Callback = function(color)
        print("Colorpicker was changed:", color)
    end
})

If you are having issues, you're supposed to replace "Tabs.Main" with your actual tab.

Example: "Tabs.Exploits"

Whatever you put in your Tabs variable, it's what you need.

Change local Colorpicker to a different variable name every time. It can be anything.

You can remove the local Colorpicker if you aren't gonna use it.

Colorpicker (name of colorpicker) is saved in the Options variable.

You can try to remove the name, but I've never tried to.

To allow users to set the transparency, just make the Transparency = 0.

I have no idea what it returns when it has transperency.

You can get the value anywhere simply by using this: (Put your variable name)

Colorpicker.Value

Or, whatever you put as the name of the toggle.

Options.Colorpicker.Value

Functions

You can check when the colorpicker is changed, but Callback does the same thing.

Colorpicker:OnChanged(function()
    print("Colorpicker changed:", Colorpicker.Value)
end)

To check the transperency, (if you're using it)

Colorpicker:OnChanged(function()
    print(
        "TColorpicker changed:", TColorpicker.Value,
        "Transparency:", TColorpicker.Transparency
    )
end)

To set the value of a colorpicker, use this.

Colorpicker:SetValueRGB(Color3.fromRGB(0, 255, 140))

Or, if you're using transperency.

Colorpicker:SetValue({0, 100, 100}, 0.5) -- hsv, transparency

If you don't set the right variable name, it won't work.

PreviousDropdownsNextKeybinds

Last updated 5 months ago