| == |
Compares the other colour to this one. The other colour will be converted
to RGB before comparison, so the comparison between a RGB colour and a
non-RGB colour will be approximate and based on the other colour’s
default #to_rgb conversion. If there is no #to_rgb conversion, this will
raise an exception. This will report that two RGB colours are equivalent if
all component values are within 1e-4 (0.0001) of each other.
|
| adjust_brightness |
Returns a new colour with the brightness adjusted by the specified
percentage. Negative percentages will darken the colour; positive
percentages will brighten the colour.
|
| adjust_hue |
Returns a new colour with the hue adjusted by the specified percentage.
Negative percentages will reduce the hue; positive percentages will
increase the hue.
|
| adjust_saturation |
Returns a new colour with the saturation adjusted by the specified
percentage. Negative percentages will reduce the saturation; positive
percentages will increase the saturation.
|
| b= |
|
| brightness |
Returns the brightness value for a colour, a number between 0..1. Based on
the Y value of YIQ encoding, representing luminosity, or perceived
brightness.
|
| darken_by |
Mix the RGB hue with Black so that the RGB hue is the specified percentage
of the resulting colour. Strictly speaking, this isn’t a darken_by
operation.
|
| from_fraction |
Creates an RGB colour object from fractional values 0..1.
|
| from_html |
Creates an RGB colour object from an HTML colour descriptor (e.g.,
"fed" or "#cabbed;".
|
| from_percentage |
Creates an RGB colour object from percentages 0..100.
|
| g= |
|
| html |
Present the colour as an HTML/CSS colour string.
|
| lighten_by |
Mix the RGB hue with White so that the RGB hue is the specified percentage
of the resulting colour. Strictly speaking, this isn’t a darken_by
operation.
|
| mix_with |
Mix the mask colour (which must be an RGB object) with the current colour
at the stated opacity percentage (0..100).
|
| new |
Creates an RGB colour object from the standard range 0..255.
|
| pdf_fill |
Present the colour as a DeviceRGB fill colour string for PDF. This will be
removed from the default package in color-tools 2.0.
|
| pdf_stroke |
Present the colour as a DeviceRGB stroke colour string for PDF. This will
be removed from the default package in color-tools 2.0.
|
| r= |
|
| to_cmyk |
Converts the RGB colour to CMYK. Most colour experts strongly suggest that
this is not a good idea (some even suggesting that it’s a very bad
idea). CMYK represents additive percentages of inks on white paper, whereas
RGB represents mixed colour intensities on a black screen.
|
| to_grayscale |
|
| to_greyscale |
Alias for #to_grayscale
|
| to_hsl |
Returns the HSL colour encoding of the RGB value.
|
| to_rgb |
|
| to_yiq |
Returns the YIQ (NTSC) colour encoding of the RGB value.
|
<code/>and<pre/>for code samples.