Skip to content

saisandeepvaddi/colorpic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Colorpic

Serves png images to use in placeholders in web development projects

Demo:

Demo deployed here

Usage

  • Get image with Height x Width Pixels default color (gray)

      https://colorpic.herokuapp.com/500/300
    
  • Get square image with default color (gray)

      https://colorpic.herokuapp.com/500
    
  • Get image with color name (must give both height and width in pixels)

      https://colorpic.herokuapp.com/500/300/green
    
  • Get image with color hex without # (must give both height and width in pixels)

      https://colorpic.herokuapp.com/500/300/00c78c
    

Use Case Examples

  • Use as src in <img> tag

    <img src="https://colorpic.now.sh/300/300/green" alt="Green Pic">
  • Use as url in css background-image: url()

      .bluish {
        height: 500px;
        width: 350px;
        background-image: url(https://colorpic.herokuapp.com/500/350/458D96);
      }
  • Pretty much where you need an image

  • Go crazy with colors

Development

  • Install dependencies

      npm install
  • Run start command

      npm run start
    
  • Application will be launched at port 3000

License