Skip to content

Ruby Gem for RGB to HSL and RGB to HSV color model conversion algorithms in Ruby

License

Notifications You must be signed in to change notification settings

anilyanduri/color_math

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

color math

Ruby Gem for RGB to HSL and RGB to HSV color model conversion algorithms in Ruby

Installation

gem install color_math

Usage

require 'rubygems'

require 'color_math'

cl = ColorMath.new 255, 255, 255

cl.to_hex # returns hex notation of r g b (255, 255, 255)

cl.to_hsl # returns hsl notation of r g b (255, 255, 255)

also can be initialized from hsl or hex with

cl = ColorMath.from_hsl(360, 100, 100) #where 360 is hue, 100 is saturation and 100 is luminous or brightness

cl = ColorMath.from_hex("#FFFFFF")

About

Ruby Gem for RGB to HSL and RGB to HSV color model conversion algorithms in Ruby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages