Results 1 to 3 of 3

Thread: DUI Designer Color Picker

  1. #1
    Join Date
    May 2004
    Location
    Dallas, TX
    Posts
    1,125

    Default DUI Designer Color Picker

    Is this a usable control for forms? I can add it to a form and select a color, however there appears to be no documentation on that control. Also need docs on the font picker.

    Thanks
    Rick

    Girder 6.0 - Elk M1 Gold - JRMC 11.1 w/ M-Audio Delta 410 - NetRemote - BlueIris DVR
    Girder 6 Plugins - Elk M1/EZ8, Pushover Connector and more on the way.


    Visit My Showcase

  2. #2
    Join Date
    May 2004
    Location
    Dallas, TX
    Posts
    1,125

    Default

    Figured it out. The Color Picker control has a field called Color. I assume is contains the 24 bit value of the color. I used the following code to convert it to RGB values.

    Code:
    function Convert24bitcolor (color)
        color = color or 0
        local red = math.mod(color,256)
        local green = math.mod(math.band(color,65280) / 256, 256)
        local blue = math.band(color,16711680) / 65536
        return red, green, blue
    end
    Seems to work great.
    Rick

    Girder 6.0 - Elk M1 Gold - JRMC 11.1 w/ M-Audio Delta 410 - NetRemote - BlueIris DVR
    Girder 6 Plugins - Elk M1/EZ8, Pushover Connector and more on the way.


    Visit My Showcase

  3. #3
    Join Date
    May 2004
    Location
    Dallas, TX
    Posts
    1,125

    Default

    Also the Fontpicker contains a table called Font it contains the following.

    Code:
    ["Font"] = { -- #1
      ["Color"] = -16777208,
      ["StrikeOut"] = false,
      ["Italic"] = false,
      ["Name"] = "MS Sans Serif",
      ["Bold"] = false,
      ["Underline"] = false,
      ["Height"] = -11,
      ["Size"] = 8,
    } -- #1,
    Rick

    Girder 6.0 - Elk M1 Gold - JRMC 11.1 w/ M-Audio Delta 410 - NetRemote - BlueIris DVR
    Girder 6 Plugins - Elk M1/EZ8, Pushover Connector and more on the way.


    Visit My Showcase

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •