Raised This Month: $51 Target: $400
 12% 

Message color


Post New Thread Reply   
 
Thread Tools Display Modes
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 09-04-2019 , 19:51   Re: Message color
Reply With Quote #11

random(256) get a random value up to 255 and random(255) up to 254.
The red, green and blue use 8 bits each, which have integer values from 0 to 255, so the first code is the way to go.

Quote:
Originally Posted by DON KHAN 1 View Post
Quote:
"Never think yourself as successfull ror DON because "
DON stands for DONKEY OF NATION

GIVE RESPECT = TAKE RESPECT

"Adding much reply in forum will not make you veteran Member"

ONLY SIGNATURE , NO PERSONAL
Ahahah thank u for giving me lot of request ... but NVM cuz i don't mind theme types of my insult & about veteran member as u can see my posts & can understand how i got this.
__________________









Last edited by CrazY.; 09-04-2019 at 19:53.
CrazY. is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 09-05-2019 , 05:24   Re: Message color
Reply With Quote #12

Doing random(256) is a bad solution, because if it results in {0, 0, 0}, it will be completely transparent, not black. Most colors will appear faded and unsaturated because of how RGB works. A good solution is to generate a HSV color with fixed saturation and value, but with random hue and then convert it to RGB. This should always give you nice vibrant colors.
__________________

Last edited by klippy; 09-05-2019 at 05:25.
klippy is offline
Old 09-05-2019, 11:14
Natsheh
This message has been deleted by Natsheh. Reason: Nvm
DON KHAN 1
Senior Member
Join Date: Mar 2019
Location: Pakistan
Old 09-05-2019 , 12:35   Re: Message color
Reply With Quote #13

So better is using by rgb colors. Thank u for answering my big confusion is solved now thank u all for helping.
__________________
Facebook
My YouTube
Ro{Y}aL WarLanD CommuniTy
Selling Zombie CSO 4.3 Money System Mod
DON KHAN 1 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode