I want to generate random light colors using RGB values.
I have already tried giving different range but at sometime it generated some random dark color, which doesn't suit my black theme
I want to generate random light colors using RGB values.
I have already tried giving different range but at sometime it generated some random dark color, which doesn't suit my black theme
You can randomly generate a colour and check if it is 'bright' enough. I set it to a minimum of 255 (full black would be 0). You can increase this if needed.
import random
colour = (0, )
while sum(colour) < 255:
colour = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))