Gdk::Color.new(red, green, blue)
-
Creats a new Gdk::Color.
- red: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
- green: The blue component of the color
- blue: The green component of the color
- Returns: The newly created Gdk::Color
Gdk::Color.parse(spec)
-
Parses a textual specification of a color and fill in the red, green, and blue fields of a Gdk::Color structure. The color is not allocated, you must call Gdk::Colormap#alloc_color yourself. The text string can be in any of the forms accepted by XParseColor; these include name for a color from rgb.txt, such as DarkSlateGray, or a hex specification such as 305050.
If spec can't be parsed, the ArgumentError will be occured.
- spec: the string specifying the color.
- Returns: the Gdk::Color
==(other)
-
Compares two colors.
- other: another Gdk::Color.
- Returns: true if the two colors compare equal
red
-
Gets the value of red.
red=(red)
-
Sets the value of red.
- red: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
- Returns: red
set_red(red)
-
Same as Gdk::Color#red=.
- red: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
- Returns: self
green=(green)
-
Sets the value of green.
- green: The green component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
- Returns: green
set_green(green)
-
Same as Gdk::Color#green=.
- green: The green component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
- Returns: self
blue=(blue)
-
Sets the value of blue.
- blue: The blue component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
- Returns: blue
set_blue(blue)
-
Same as Gdk::Color#blue=.
- blue: The blue component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
- Returns: self
pixel
-
Retrieves the value used to draw this color on the screen (for allocated colors).
- Returns: the value used to draw this color on the screen
to_a
-
Retrieves the value of the color.
- Returns: [red, green, blue]
Keyword(s):
References:[Poppler::Page] [tut-treeview-renderer-attributes] [Gdk::Window] [Gdk::Pixmap] [Gtk::ColorButton] [Gtk::Settings] [Gtk::ColorSelection] [Gdk::Drawable] [Gtk::TextTag] [Gtk::RcStyle] [Gdk::Color] [Gdk::Event] [Gdk::GC] [Gtk::CellRenderer] [Gtk::CellView] [Gdk::Colormap] [Gtk::Style] [Gtk::Widget] [Vte::Terminal] [Gtk::CellRendererText] [Gdk::PangoRenderer] [Cairo::Context] [Gdk::Cursor]