http://www.perlmonks.org?node_id=70504


in reply to RE: hex color generator
in thread hex color generator

You want that sprintf string to be "%02x%02x%02x" so that zeropadding is turned on and set to 2 chars width. otherwise (255,128,9) gets you 'ff809' which may not be too useful where a 6 char value is required. =)

--
$you = new YOU;
honk() if $you->love(perl)