Skip navigation
Currently Being Moderated

Hexadecimal Input

Aug 6, 2012 7:41 AM

Hey Guys,

 

I did some looking around but I can't seem to find anything about INPUT of a hex code via script.  ScriptListener also outputs code referencing RGB even when editing the hex field of the color picker.  About the most I was able to find was something referencing the RGBColor.hexValue property, but not how to use it.  The template files I'm being given all come with their colors in hex, so I need a way to input those into the code to change the color.  Thanks for any help!

 

dgolberg

 
Replies
  • Currently Being Moderated
    Aug 6, 2012 8:21 AM   in reply to dgolberg

    You can use colour in Hex, CMYK or RGB. But if you're using hex you still have to add a rgb property to it .Try this:

     

    // set foreground colour to red
    var fgColor = new SolidColor;
    fgColor.rgb.hexValue ="ff0000"  //bright red
    foregroundColor = fgColor
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points