GitHub • RubyGems • Documentation
RGB::Color
class:- Added
#yuv
method.
- Added
- A few small improvements under the hood.
GitHub • RubyGems • Documentation
Adds the ability to generate HSL, HSB and HSV based gradients:
RGB::Color
class:- Added
#steps_hsl
method. - Added
#steps_hsv
method and#steps_hsb
alias.
- Added
Other changes:
RGB
module:- New
'wilhelm'
inspect style.
- New
GitHub • RubyGems • Documentation
Introduces the ability to create and change colors using CIE 1931 XYZ values.
RGB
module:cie_xyz
factory method andxyz
alias.
RGB::Color
class:cie_xyz
factory method andxyz
alias.#cie_xyz=
method and#xyz=
alias.
Other changes:
RGB::Color
class:#cie_xyy
now accepts an optionalround:
argument.#cie_xy
now accepts an optionalround:
argument.
- Touched up documentation.
GitHub • RubyGems • Documentation
This version is a drop-in replacement for version 0.15.0, with no new functionality.
- Some internal changes were made:
- The RGB class is now the RGB::Color class.
- RGB is now a module.
GitHub • RubyGems • Documentation
- Core RGB class:
- CIE 1994 processing:
- Added
#delta_e_cie_1994
method and#de94
alias. - Added
#de94g
and#de94t
shortcut methods.
- Added
- Color matching methods:
- Added
#match_de94
method. - Added
#match_de94g
and#match_de94t
shortcut methods.
- Added
#view
accepts an RGB object as an optional argument, for visual comparison of colors.- Added
#web_safe?
method.
- CIE 1994 processing:
GitHub • RubyGems • Documentation
- Core RGB class:
- Added
#css_names
method. - Added
#hwb
method. - Support for working with Web Content Accessibility Guidelines 2.0:
- Added
#wcag20_luminance
method. - Added
#wcag20_contrast_ratio
method.
- Added
- Added
::gpl_header
method. - The
#ostwald_cwk
method now rounds results to a precision of 8 decimal places. This fixes rare inaccuracies.
- Added
GitHub • RubyGems • Documentation
- General:
- Minor code optimisations.
- Core RGB class:
- Color matching methods:
- Added
#match_de76
method. - Added
#match_distance
method.
- Added
- Added
::corners
method. - Added
::centre
method and::center
alias. - Added
#applescript
method.
- Color matching methods:
GitHub • RubyGems • Documentation
- Core RGB class:
- Added
#view
method,#v
alias, and'view'
inspect style. - CIE 1976 processing:
- Added
#cie_lab
method and#lab
alias. - Added
#cie_lch_ab
method. - Added
#cie_luv
method and#luv
alias. - Added
#cie_lch_uv
method. - Added
#delta_e_cie_1976
method and#de76
alias.
- Added
- Added
#distance
method. - RGB colors can now have a
name
attribute:- Added
#name
and#name=
methods. - Added colorised
'name'
inspect style. 'default'
and'simple'
inspect styles include name.#gpl
method picks up name attribute.
- Added
- Added 148 named CSS colors, accessible by color or by name:
- Added
::css
method.
- Added
- Added ability to create color objects from GIMP .gpl palettes:
- Added
::gpl
method. - Added
::load_gpl
method.
- Added
#inspect
now prefixes hexadecimal notation with~
(tilde) when the exact color can not be represented within 24-bits, and hexadecimal notation represents the nearest 24-bit color instead.- Improved
#cie_xyz
and#cie_xyy
methods to produce results with a precision of 8 decimal places (formerly 6). - Fixed a bug where calling
#color_space
,#linear_values
, or any of the#cie
methods on a frozen RGB object might raise an exception.
- Added
GitHub • RubyGems • Documentation
- General:
- Polished documentation.
- Core RGB class:
- Added
#ostwald_color
method. - Added
#ostwald_cwk
method and#cwk
alias. - Added
#achromatic?
method. - Added
#gpl
method. - Added
#snap!
and#snap
methods. #whiten
and#blacken
now accept more than one argument, e.g.RGB.red.whiten(0.2, 0.5, 0.8)
will return three RGB objects.- If a
REDGREENBLUE_STYLE
environment variable is set, redgreenblue will use it to set the inspect style.
- Added
GitHub • RubyGems • Documentation
- Core RGB class:
- Added
#hsl_h
,#hsl_s
, and#hsl_l
methods. - You can now create and alter RGB colors using HSL:
- Added
::hsl
factory method. - Added
#hsl=
method. - Added
#hsl_h=
,#hsl_s=
, and#hsl_l=
methods. - Added
#hsl_rotate!
method. - Added
#hsl_rotate
method. - Added
::hsl_to_values
helper method.
- Added
- Added
#hsv_h
,#hsv_s
, and#hsv_v
methods, and#hsb_h
,#hsb_s
, and#hsb_b
aliases. - You can now create and alter RGB colors using HSV and HSB:
- Added
::hsv
factory method and::hsb
alias. - Added
#hsv=
method and#hsb=
alias. - Added
#hsv_h=
,#hsv_s=
, and#hsv_v=
methods, and#hsb_h=
,#hsb_s=
, and#hsb_b=
aliases. - Added
hsv_rotate!
method andhsb_rotate!
alias. - Added
hsv_rotate
method andhsb_rotate
alias. - Added
::hsv_to_values
helper method.
- Added
- Fixed precision of hue returned by
#hsl
,#hsv
, and#hsb
methods. - Removed
#rgb565_binary
method (deprecated in 0.9.0).
- Added
GitHub • RubyGems • Documentation
- General:
- Tweaked documentation.
- Core RGB class:
- Added
#linear_values
and#linear_values=
methods. - Added
#steps
method. - Added
#to_i
method. - Added
::at
factory method. - Added
::assemble
factory method. - Added
::yellow
,::cyan
, and::magenta
factory methods. - Added colorised
'short'
inspect style. - Added
::version
method. - Deprecated
#rgb565_binary
method. It will be removed in a future version.
- Added
GitHub • RubyGems • Documentation
- General:
- Improved documentation.
- Core RGB class:
- Added the ability to choose among four inspect styles:
- Added
::styles
,::style
, and::style=
methods. - Added
'default'
and'hex'
inspect styles. - Added
'simple'
and'swatch'
colorised inspect styles. - Depending on the
COLORTERM
environment variable, the initial style is'simple'
(COLORTERM=='truecolor'
), or'default'
. - Note: colorised styles require a terminal that supports 24-bit colors, so-called "true color".
- Added
- Added methods to calculate CIE 1931 XYZ and xyY coordinates:
- Added
#cie_xyz
method and#xyz
alias. - Added
#cie_xyy
method and#xyy
alias. - Added
#cie_xy
method and#xy
alias.
- Added
- Added
#color_space
method. - Added
#components
method. - Added
#permutation
method. - Added
#shuffle
method. - Added
#css_hex
method. #whiten!
,#whiten
,#blacken!
, and#blacken
now default to mixing with a 50% portion of white or black when called without an argument.- Added
#terminal_foreground
and#terminal_background
methods. - Added
::each_24bit_color
iterator. ::hex
and#hex=
methods now raise anArgumentError
when fed an invalid hexadecimal string.- Added
::hex_to_rgb
method.
- Added the ability to choose among four inspect styles:
- Platform specific:
- Mac OS only:
- The color picker now works correctly when you are using iTerm2 (
::pick
and#pick
methods no longer activate Terminal.app).
- The color picker now works correctly when you are using iTerm2 (
- Mac OS only:
GitHub • RubyGems • Documentation
- General:
- Improved documentation.
- Core RGB class:
- Added
==
equality operator. - Added
::red
,::green
, and::blue
factory methods. - Added
#to_s
method. - Added
#hsv
method and#hsb
alias. - Added
#hsl
method. - Added
#to_h
method. - Added
::grey
factory method and::gray
alias. - RGB triplets can now either be passed as an array (as before), or as three values.
For example, you can now do
RGB.new(0,1,0)
instead ofRGB.new([0,1,0])
. This applies to:::new
,::rgb
and::rrggbb
factory methods.#values=
,#rgb=
and#rrggbb=
instance methods.
- Added
- Optional components:
- Added optional support for Philips Hue lights. You can enable this with
require 'redgreenblue/opt/philipshue'
.- Added
#to_philips_hue_api_hsb_arguments
method.
- Added
- Added optional support for Philips Hue lights. You can enable this with
- Platform specific:
- Mac OS only:
::pick
now optionally takes a default color for the color picker.
- Mac OS only:
GitHub • RubyGems • Documentation
- First release as a Gem.
- Birth of redgreenblue.