User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 23

Thread: Hex Colour From Colour Selector Object

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    England
    Posts
    820
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hex Colour From Colour Selector Object

    Hi All,

    I'm making a HTML editor but can't figure out how to get the colour from the Colour Selector object in to a Hex colour. The object doesn't seem to support giving you the RRGGBB values to use Hex$ in MMF2?

    Any help would be greatly appreciated!

    Thanks,

    Steve

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hex Colour From Colour Selector Object

    Hex$(Red + (Green * 256) + ( Blue * 65536))

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    England
    Posts
    820
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hex Colour From Colour Selector Object

    How do I grab the reds, greens and blues?

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hex Colour From Colour Selector Object

    I thought that the number the selector returned would already be Red + (Green * 256) + ( Blue * 65536)

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    England
    Posts
    820
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hex Colour From Colour Selector Object

    If I get the colour from the object for pure red for instance all I get is 255. How do I know what the Green and Blue should be? Pure green gives you 65280 but again how do I know that the red and blue should be zero?

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Hex Colour From Colour Selector Object

    GetRed(), GetGreen() and GetBlue().

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    England
    Posts
    820
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hex Colour From Colour Selector Object

    Thanks guys i'm getting there!

    If I select pure red and convert that using Hex$(Red + (Green * 256) + ( Blue * 65536)) all I get back is FF?

    Sorry for being such a pain!

    Steve

  8. #8
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hex Colour From Colour Selector Object

    Hex$(colour) (no need for the red/green/blue functions) should get back the hex without 0s at the beginning. You need to use: left$("000000",6-len("hex"))+"hex" to add the right number of 0s to the beginning.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hex Colour From Colour Selector Object

    That doesn't work though. MMF goes like [Blue * 65536 + Green * 256 + Red].

    In other words, it would output the colours in the order Blue, Green, Red. On a website, you write them in the order Red, Green, Blue, the calculation will have to be [Red * 65536 + Green * 256 + Blue].

  10. #10
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Hex Colour From Colour Selector Object

    Well then I guess you do need to do:
    Hex$(GetRed(colour)*65536+GetGreen(colour)*256+Get Blue(colour))
    And then:
    left$("000000",6-len("hex"))+"hex"
    to add the 0s to the beginning.

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Set Colour for counters event on iOS seems to change to the wrong colour
    By Diablohead in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 15th December 2013, 11:23 AM
  2. Active Object Colour Replacement?
    By Colonial_Settler in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 9th July 2013, 10:58 AM
  3. Replies: 4
    Last Post: 27th August 2012, 08:34 AM
  4. Tab Object. Chnange tab colour
    By DJFuego in forum Extension Development
    Replies: 1
    Last Post: 4th May 2010, 10:13 AM
  5. Colour Selector [Feature Request]
    By Benicle in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th June 2008, 11:40 AM

Posting Permissions

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