I'm using a charting library that takes color values in hex, so white would be 0xffffff. This is a number, not a string, so doing something like "0x" + my_color_variable wouldn't work.
If I have a variable from user input that is "FFFFFF", how can I convert it to the hex number 0xffffff? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

