Random Hex Color Generator

  • Share this:

Code introduction


This function returns a random hexadecimal color code.


Technology Stack : Bokeh

Code Type : Function

Code Difficulty : Intermediate


                
                    
import random

def random_color_hex():
    return f"#{random.randint(0, 0xFFFFFF):06X}"                
              
Tags: