Skip to content

kuldeep-k/colorShades

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

colorShades v0.2

Plugin create a widget having the shades of single color.

Following code is needed to show widget.

$('#fieldId').colorShades({
    l_items: LIGHTER_SHADES_COUNT,
    r_items: DARKER_SHADES_COUNT,
    step: STEPS,
    base_color: BASE_COLOR,
    onSelect : CALLBACK 
});

Exmaple  : 

$('#fieldId').colorShades({
    l_items: 2,
    r_items: 3,
    step: 2,
    base_color: '#345a01',
    onSelect : function() {
        Call your functionality
    }
});
  • BASE_COLOR is hex color code for color which shades are needed
  • LIGHTER_SHADES_COUNT is color shades lighter than base color.
  • DARKER_SHADES_COUNT is color shades darker than base color
  • STEPS define the how much color change during next palette color. More steps means bigger change.
  • CALLBACK set the custom functionaity on selection of color.

Also checkout demo.html file to see example.

Note : Plugin requires following libraries.

jQuery and tinycolor library.

About

Plugin create a widget having the shades of single color.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published