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, Quote 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); Quote 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? Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.