All Projects → metafizzy → Huebee

metafizzy / Huebee

🐝 1-click color picker

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Huebee

Iro.js
🎨 Modular color picker widget for JavaScript, with support for a bunch of color formats
Stars: ✭ 796 (+139.76%)
Mutual labels:  plugin, widget, color
Nord Tmux
An arctic, north-bluish clean and elegant tmux color theme.
Stars: ✭ 567 (+70.78%)
Mutual labels:  plugin, color
Web3modal
A single Web3 / Ethereum provider solution for all Wallets
Stars: ✭ 515 (+55.12%)
Mutual labels:  plugin, widget
Xcodecolorsense
🎈 An Xcode plugin that makes working with color easier
Stars: ✭ 79 (-76.2%)
Mutual labels:  plugin, color
Pickr
🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
Stars: ✭ 3,759 (+1032.23%)
Mutual labels:  widget, color
Flutter statusbarcolor
A package can help you to change your flutter app's statusbar's color or navigationbar's color programmatically.
Stars: ✭ 203 (-38.86%)
Mutual labels:  plugin, color
Pure Css3 Animated Border
Pure CSS3 animated border for all html element.
Stars: ✭ 63 (-81.02%)
Mutual labels:  plugin, widget
Dynamic Support
A complete library to build Android apps with a built-in theme engine.
Stars: ✭ 218 (-34.34%)
Mutual labels:  widget, color
Chartjs Plugin Colorschemes
Predefined color schemes for Chart.js
Stars: ✭ 189 (-43.07%)
Mutual labels:  plugin, color
Uppload
📁 JavaScript image uploader and editor, no backend required
Stars: ✭ 1,673 (+403.92%)
Mutual labels:  plugin, widget
Fanray
A blog built with ASP.NET Core
Stars: ✭ 117 (-64.76%)
Mutual labels:  plugin, widget
Colorpicker
jQuery UI widget for color picking (similar to the one in Microsoft Office 2010).
Stars: ✭ 271 (-18.37%)
Mutual labels:  widget, color
react-color
🎨 Is a tiny color picker widget component for React apps.
Stars: ✭ 50 (-84.94%)
Mutual labels:  color, widget
Nord Jetbrains
An arctic, north-bluish clean and elegant JetBrains IDE UI and editor color theme.
Stars: ✭ 293 (-11.75%)
Mutual labels:  plugin, color
Super Progressive Web Apps
SuperPWA helps to convert your WordPress website into Progressive Web Apps instantly. PWA (Progressive Web Apps) demo at : https://superpwa.com and Plugin :
Stars: ✭ 304 (-8.43%)
Mutual labels:  plugin
Hue
🎨 Hue is the all-in-one coloring utility that you'll ever need.
Stars: ✭ 3,306 (+895.78%)
Mutual labels:  color
Vimpyter
Edit your Jupyter notebooks in Vim/Neovim
Stars: ✭ 308 (-7.23%)
Mutual labels:  plugin
Farge
Click on a pixel on your screen and show its color value
Stars: ✭ 307 (-7.53%)
Mutual labels:  color
React Native Today Widget
iOS Today Widget in React Native
Stars: ✭ 320 (-3.61%)
Mutual labels:  widget
Vim Flog
A lightweight and powerful git branch viewer for vim.
Stars: ✭ 314 (-5.42%)
Mutual labels:  plugin

Huebee

🐝 1-click color picker

See huebee.buzz for complete docs and demos.

Install

Download

CDN

Link directly to Huebee files on unpkg.

<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/huebee.min.css">
<script src="https://unpkg.com/[email protected]/dist/huebee.pkgd.min.js"></script>

Package managers

npm: npm install huebee --save

Bower: bower install huebee --save

Usage

Initialize Huebee on an anchor element.

<input class="color-input" />

Huebee will open whenever the anchor is clicked or focused (for inputs and buttons).

Initialize with JavaScript

// use selector string to initialize on single element
var hueb = new Huebee( '.color-input', {
  // options
  setBGColor: true,
  saturations: 2,
});

// or use element
var colorInput = document.querySelector('.color-input');
var hueb = new Huebee( colorInput, {
  // options
  setBGColor: true,
  saturations: 2,
});

Initialize with HTML

You can initialize Huebee in HTML, without writing any JavaScript. Add data-huebee attribute to an element.

<input class="color-input" data-huebee />

Options can be set in value of data-huebee. Options set in HTML must be valid JSON. Keys need to be quoted, for example "setBGColor":. Note that the attribute value uses single quotes ', but the JSON entities use double-quotes ".

<input class="color-input" data-huebee='{ "setBGColor": true, "saturations": 2 }' />

Options

var hueb = new Huebee( '.color-input', {
  // options

  hues: 6,
  // number of hues of the color grid
  // default: 12

  hue0: 210,
  // the first hue of the color grid
  // default: 0

  shades: 7,
  // number of shades of colors and shades of gray between white and black
  // set to 0 to use only custom colors
  // default: 5

  saturations: 2,
  // number of sets of saturation of the color grid
  // 3 saturations => [ 100% saturation, 66% saturation, 33% saturation ]
  // default: 3

  notation: 'hex',
  // the text syntax of colors
  // values: shortHex, hex, hsl
  // shortHex => #F00, hex => #FF0000, hsl => hsl(0, 100%, 50%)
  // default: shortHex

  setText: false,
  // sets text of elements to color, and sets text color
  // true => sets text of anchor
  // string, '.color-text' => sets elements that match selector
  // default: true

  setBGColor: false,
  // sets background color of elements
  // and text color so text is visible on light or dark colors
  // true => sets background color of anchor
  // string, '.color-bg' => sets elements that match selector
  // default: true

  customColors: [ '#19F', '#E5A628', 'darkgray', 'hsl(210, 90%, 55%)' ]
  // custom colors added to the top of the grid

  staticOpen: true,
  // displays open and stays open
  // default: false

  className: 'color-input-picker',
  // class added to Huebee element, useful for CSS
});

CSS

Set the size of the color grid with by setting the size of .huebee__cursor in CSS.

.huebee__cursor {
  width: 25px;
  height: 25px;
}

Style Huebee with your own CSS.

.huebee {
  transition: none; /* disable reveal/hide transition */
}

.huebee__container {
  background: #444;
  border: 1px solid #222;
  border-radius: 20px;
}

.huebee__cursor {
  border: 2px solid #19F;
}

.huebee__close-button {
  background: red;
}

.huebee__close-button__x {
  stroke-width: 2;
}

Use className option for specificity.

<div class="dark-swatch" data-huebee='{ "className": "dark-picker" }'></div>
<div class="light-swatch" data-huebee='{ "className": "light-picker" }'></div>
.dark-picker .huebee__container {
  background: #222;
}

.light-picker .huebee__container {
  background: #F8F8F8;
}

API

var hueb = new Huebee( element, options );

Properties

hueb.color // => #F00
// {String} - text color value

hueb.hue // -> 0
// {Number} - angle of hue of color, 0...360

hueb.sat // -> 1
// {Number} - saturation of color, 0...1

hueb.lum // -> 0.5
// {Number} - luminance of color, 0...1

Methods

hueb.open()
// opens Huebee

hueb.close()
// closes Huebee

Events

hueb.on( 'change', function( color, hue, sat, lum ) {
  console.log( 'color changed to: ' + color )
})

MIT License

By Metafizzy

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].