Anyone know how I might convert a grayscale value, from between 0 to
100, to hex, such that 0 (black) would be returned as #00, and 100
(white) as #FF? For example...
function grayscaletohex ($val) {
$hex = $val ... [ a simple operation ]
return $hex;
}
Thanks.
Anyone know how I might convert a grayscale value, from between 0 to
100, to hex, such that 0 (black) would be returned as #00, and 100
(white) as #FF? For example...
function grayscaletohex ($val) {
$hex = $val ... [ a simple operation ]
return $hex;
}
Thanks.
$results = $h.$h.$h;// create 6 digit browser color
string
return $results;
}
-Original Message-
From: René Fournier [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 23, 2002 12:52 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Convert a grayscale value to a #RRGGBB hex value
3 matches
Mail list logo