GTROCKSTAR Posted December 28, 2009 Share Posted December 28, 2009 $white = imagecolorallocate($image_p, 255, 255, 255); It shows white but i dont want white. I want this hex color: #111A22 How do i Allocate that hex so it works for that $white variable, Thank you, Link to comment https://forums.phpfreaks.com/topic/186484-imagecolorallocate-function-choosgin-my-own-color/ Share on other sites More sharing options...
oni-kun Posted December 28, 2009 Share Posted December 28, 2009 $white = imagecolorallocate($image_p, 255, 255, 255); It shows white but i dont want white. I want this hex color: #111A22 How do i Allocate that hex so it works for that $white variable, Thank you, Just use a hex->RGB converter if you're unsure: $white = imagecolorallocate($image_p, 12, 26, 34); Link to comment https://forums.phpfreaks.com/topic/186484-imagecolorallocate-function-choosgin-my-own-color/#findComment-984753 Share on other sites More sharing options...
GTROCKSTAR Posted December 28, 2009 Author Share Posted December 28, 2009 Well I wrote this script.. $color = '#111A22'; print_r(sscanf($color, '#%2x%2x%2x')); It prints it out but How do I input this baby in there? Link to comment https://forums.phpfreaks.com/topic/186484-imagecolorallocate-function-choosgin-my-own-color/#findComment-984754 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.