Jump to content

Tinting always turn out black. need help


Le Twitch
 Share

Recommended Posts

Yeah you cannot use shorthand with JavaScript numbers, as they're interpreted literally; 0xfff === 4095 and 0xffffff === 16777215. Three digit hex codes are a shorthand added to the CSS specification but only make sense if the interpreter is expecting either a 3 or a 6 digit hex code. The 0x notation used by JavaScript always direcly represents actual numbers and can be any length.

Link to comment
Share on other sites

Most likely you are using the wrong format for the colour value. It needs to be a number like 0xff0000, not a string like "#ff0000" or "red"

myField.tint = 0xffcc00;

the above works for me.

 

Thanks for the help, it works now. Now I have another problem :S 0x000000 which is black, doesn't work 

Link to comment
Share on other sites

  • 4 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...