GData.Color

Fields

Name

Type

Access

Description

blue

int

r/w

blue color intensity, from 0–255

green

int

r/w

green color intensity, from 0–255

red

int

r/w

red color intensity, from 0–255

Methods

class

from_hexadecimal (hexadecimal)

to_hexadecimal ()

Details

class GData.Color

Describes a color, such as used in the Google Calendar interface to differentiate calendars.

classmethod from_hexadecimal(hexadecimal)
Parameters:

hexadecimal (str) – a hexadecimal color string

Returns:

True on success, False otherwise

color:

a GData.Color

Return type:

(bool, color: GData.Color)

Parses hexadecimal and returns a GData.Color describing it in color.

hexadecimal should be in the form #rrggbb, where rr is a two-digit hexadecimal red intensity value, gg is green and bb is blue. The hash is optional.

to_hexadecimal()
Returns:

the color string; free with GLib.free()

Return type:

str

Returns a string describing self in hexadecimal form; in the form #rrgg bb, where rr is a two-digit hexadecimal red intensity value, gg is green and bb is blue. The hash is always present.

New in version 0.3.0.