GitPedia
EastDesire

EastDesire/jscolor

JavaScript color picker with opacity (alpha channel) and customizable palette. Single file of plain JS with no dependencies.

30 Releases
Latest: 2y ago
jscolor-2.5.22.5.2Latest
EastDesireEastDesire·2y ago·December 2, 2023
GitHub

📋 Changes

  • Added support for initing jscolor after DOMContentLoaded has fired. Thanks to @andrewcartwright1
jscolor-2.5.12.5.1
EastDesireEastDesire·3y ago·October 18, 2022
GitHub

📋 Changes

  • Added fix to avoid unnecessary repositioning during scroll
jscolor-2.5.02.5.0
EastDesireEastDesire·3y ago·September 6, 2022
GitHub

📋 Changes

  • Some elements are now styled using document-wide CSS dynamically appended to document's HEAD
  • Added CSS that resets some important CSS properties of picker's elements to their initial values
  • Added support for #RRGGBBAA format in palettes specified as string
  • Slightly increased font size for button(s)
  • Changed class names of some elements
jscolor-2.4.92.4.9
EastDesireEastDesire·3y ago·August 25, 2022
GitHub

📋 Changes

  • Updated redrawPosition() method to fix incorrect dialog positioning when using custom 'container'. Thanks to @Kirsdarkenvaar.
jscolor-2.4.82.4.8
EastDesireEastDesire·4y ago·March 24, 2022
GitHub

📋 Changes

  • Replaced deprecated 'substr' method with 'slice'. Thanks to contributor @CommanderRoot
jscolor-2.4.72.4.7
EastDesireEastDesire·4y ago·February 4, 2022
GitHub

📋 Changes

  • Removed captureTarget/releaseTarget (no longer needed)
jscolor-2.4.62.4.6
EastDesireEastDesire·4y ago·August 21, 2021
GitHub

📋 Changes

  • Added property 'random' and method randomize()
jscolor-2.4.52.4.5
EastDesireEastDesire·5y ago·January 12, 2021
GitHub

📋 Changes

  • Added support for #rrggbbaa notation (implemented as 'hexa' format)
jscolor-2.4.42.4.4
EastDesireEastDesire·5y ago·January 5, 2021
GitHub

📋 Changes

  • Picker's position is updated when scrolling the window
jscolor-2.4.32.4.3
EastDesireEastDesire·5y ago·January 2, 2021
GitHub

📋 Changes

  • Added option paletteSetsAlpha
  • By default, palette colors that don't specify alpha will set alpha to 1.0, but only if the palette contains at least one color with transparency (alpha < 1.0)
jscolor-2.4.22.4.2
EastDesireEastDesire·5y ago·December 28, 2020
GitHub

📋 Changes

  • Fixed infinite loop bug that occurs when sliderSize or paletteCols is set to 0
  • Added static method jscolor.ready() that calls given function as soon as jscolor is initialized
  • Current color is now also reflected in 'data-current-color' attribute of the target element
  • Public method getCurrentFormat() renamed back to getFormat()
jscolor-2.4.12.4.1
EastDesireEastDesire·5y ago·December 27, 2020
GitHub

📋 Changes

  • Added support for custom palette (swatch)
  • Added options: palette, paletteCols, paletteHeight, paletteSpacing, hideOnPaletteClick
  • Added value for option paletteCols into presets 'small', 'medium', and 'large'
jscolor-2.4.02.4.0
EastDesireEastDesire·5y ago·November 7, 2020
GitHub

📋 Changes

  • Added module wrapper to allow using jscolor as a module
  • jscolor.init() method made public
jscolor-2.3.32.3.3
EastDesireEastDesire·5y ago·August 11, 2020
GitHub

📋 Changes

  • added option hideOnLeave
jscolor-2.3.22.3.2
EastDesireEastDesire·5y ago·July 18, 2020
GitHub

📋 Changes

  • limiting Close button's maximum width to prevent overflow
jscolor-2.3.12.3.1
EastDesireEastDesire·5y ago·July 16, 2020
GitHub

📋 Changes

  • the 'refine' option was removed
  • added sliderSize values into presets 'small', 'medium', 'large'
  • added buttonColor values into presets 'light' and 'dark'
  • presets specify colors in rgba format
  • linked elements now have their jscolor-related data stored in a single property '_data_jscolor'
jscolor-2.3.02.3.0
EastDesireEastDesire·5y ago·July 14, 2020
GitHub

📋 Changes

  • the 'hash' option is enabled by default
  • fixed bug that the 'change' event wasn't re-triggered upon leaving the input field when its value was programmatically refined
  • if dragging the alpha slider while format is 'any', the 'rgba' format will be forced
  • the install() method now accepts an optional argument rootNode
  • added method getFormat() that returns the color format currently in effect
  • added possibility to specify the 'default' preset in the 'preset' option (useful for raising its priority over other presets)
  • color-related options now have their default values in rgba format
jscolor-2.2.42.2.4
EastDesireEastDesire·5y ago·July 9, 2020
GitHub

📋 Changes

  • alpha slider will be automatically enabled if initial 'alpha' option is set
  • disabled autocorrect and autocapitalize on valueElement and alphaElement
jscolor-2.2.32.2.3
EastDesireEastDesire·5y ago·July 2, 2020
GitHub

📋 Changes

  • fixed warning message for unparseable data-jscolor configuration
  • specifying passive flag (false) when registering touch event listener to prevent console warning
  • removed outdated polyfills for event listeners
jscolor-2.2.22.2.2
EastDesireEastDesire·5y ago·July 1, 2020
GitHub

📋 Changes

  • attaching ontouchstart listener only to picker box - this fixes usability issues on touch devices. (Thanks to Brendon M.)
  • added static method jscolor.hide() that hides the color picker box (in addition to existing pickerInstance.hide() method)
jscolor-2.2.12.2.1
EastDesireEastDesire·6y ago·June 27, 2020
GitHub

📋 Changes

  • color picker won't show on disabled target elements
  • increased default z-index to 5000
jscolor-2.2.02.2.0
EastDesireEastDesire·6y ago·June 26, 2020
GitHub

📋 Changes

  • added support for alpha channel (opacity) and RGBA output format
  • added support for query selectors - elements can now be specified using CSS query selectors
  • element IDs in all element-related options now must be prefixed with '#' character in order to be valid CSS selectors
  • toString() method now returns a color code in current format (and includes leading '#' in case of HEX format)
  • property styleElement renamed to previewElement
  • property onFineChange renamed to onInput
  • property overwriteImportant renamed to forceStyle
  • property closable renamed to closeButton
  • + 15 more
jscolor-2.1.12.1.1
EastDesireEastDesire·6y ago·June 15, 2020
GitHub

📋 Changes

  • added jscolor.presets property
  • added <picker>.toGrayscale() method
  • color picker box now hides when Enter or Escape key is pressed
  • jscolor.options is now deprecated
jscolor-2.1.02.1.0
EastDesireEastDesire·6y ago·June 12, 2020
GitHub

📋 Changes

  • jscolor now installs on elements having 'data-jscolor' attribute
  • class="jscolor" is no longer needed, but still supported for backward compatibility
  • the 'jscolor' variable is now accessible via alias 'JSColor'
  • added classes to color picker elements: 'jscolor-picker', 'jscolor-picker-wrap', 'jscolor-picker-shadow', 'jscolor-picker-border', 'jscolor-btn-close'
  • prints console warning when trying to set an unrecognized configuration option
  • valueElement's value is now being set only if it differs from the new value
jscolor-2.0.42.0.4
EastDesireEastDesire·10y ago·November 9, 2015
GitHub

📋 Changes

  • Added a minified version (generated using UglifyJS)
jscolor-2.0.32.0.3
EastDesireEastDesire·10y ago·November 7, 2015
GitHub

📋 Changes

  • Fixed bug which prevented closing the picker during tap event on touch devices
  • jscolor instance now gets registered only once, even if the <script> is included multiple times
jscolor-2.0.22.0.2
EastDesireEastDesire·10y ago·November 6, 2015
GitHub

📋 Changes

  • Improved color picker positioning
  • When resizing browser window, color picker position is continuously updated
  • When scrolling one of the offsetParents, color picker is hidden
  • Fixed positioning is now autodetected, no need to set the parameter 'fixed'
  • Added support for rgb color notation, e.g. rgb(160, 0, 255)
  • Added toHEXString() and toRGBString() methods
jscolor-2.0.02.0.0
EastDesireEastDesire·10y ago·October 27, 2015
GitHub
jscolor-1.4.5v1.4.5
EastDesireEastDesire·10y ago·October 27, 2015
GitHub
jscolor-1.4.2v1.4.2
EastDesireEastDesire·10y ago·October 27, 2015
GitHub