Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

color_picker

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color_picker

  • 0.1.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Color Picker

Build Status Coverage Status a tool to get a color based on color palette, also have a method to export to html all the color palette


Example

  • generate a complete palette
  @palette= ColorPicker::Palette.new(template: :complete)
  • then you have a complete range of colors
 @palette.rgb
  • You can get a sample color
 @palette.sample_color
 > #<ColorPicker::Color:0x007f4dc236ac10 @hex_code="000000">
  • generate a dark palette
  @palette.generate(template: :dark)
  > [0..7, 0..9, 0..255]
Color

*initialize with string or array of rgb number

  @color = ColorPicker::Color.new("000000")
  • initialize with rgb array range
  @color = ColorPicker::Color.new([255, 255,255])

*converters

 @color.to_rgb
 @color.to_hex

*printers

 @color.to_s

FAQs

Package last updated on 17 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc