Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On 8.1.21 release, make this visible and update parameters in parentheses above
  • Results

String - A string that is the hex value of the specified value.


Panel
titleSyntax

toHex(number)

  • Parameters

Integer number - The number to convert to hex.

Editor_notes
New_in
Version8.1.21


toHex(color)

  • Parameters

Color color - An RGBA set to convert to hex.

  • Results

String - A string that is the hex value of the specified value.

Panel
titleExamples
Code Block
languageactionscript3
titleCode Snippet
toHex(255) //Returns "FF".
editor_notes
Code Block
languageactionscript3
titleCode Snippet
toHex(-255)  //Returns "FFFFFF01".
Code Block
languageactionscript3
titleCode Snippet
toHex(color(192,26,68,241))   //Returns "C01A44F1"