Module: Colors
- Defined in:
- lib/colors.rb,
lib/colors/css.rb,
lib/colors/hsl.rb,
lib/colors/rgb.rb,
lib/colors/xyy.rb,
lib/colors/xyz.rb,
lib/colors/hsla.rb,
lib/colors/husl.rb,
lib/colors/rgba.rb,
lib/colors/utils.rb,
lib/colors/helper.rb,
lib/colors/convert.rb,
lib/colors/version.rb,
lib/colors/colormap.rb,
lib/colors/xterm256.rb,
lib/colors/color_data.rb,
lib/colors/named_colors.rb,
lib/colors/colormap_data.rb,
lib/colors/abstract_color.rb,
lib/colors/alpha_component.rb,
lib/colors/listed_colormap.rb,
lib/colors/colormap_registry.rb,
lib/colors/linear_segmented_colormap.rb,
lib/colors/colormap_data/seaborn_builtin.rb,
lib/colors/colormap_data/matplotlib_builtin.rb
Defined Under Namespace
Modules: AlphaComponent, CSS, ColorData, ColormapRegistry, Convert, Helper, NamedColors, Utils Classes: AbstractColor, Colormap, HSL, HSLA, HUSL, LinearSegmentedColormap, ListedColormap, RGB, RGBA, XYY, XYZ, Xterm256
Constant Summary collapse
- WHITE_POINT_D65 =
ITU-R BT.709 D65 white point See https://en.wikipedia.org/wiki/Rec._709 for details
Colors::XYY.new(0.3127r, 0.3290r, 1r).to_xyz
- VERSION =
"0.4.0"
Class Method Summary collapse
Class Method Details
.[](name) ⇒ Object
38 39 40 |
# File 'lib/colors.rb', line 38 def self.[](name) NamedColors[name] end |
.desaturate(c, factor) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/colors.rb', line 30 def self.desaturate(c, factor) case c when String c = NamedColors[c] end c.desaturate(factor) end |